Beispiel #1
0
    public void Shoot()
    {
        rb.UnLockTransform();
        Vector3 force = new Vector3(0, 5, 0);

        rb.ApplyImpulse(force + transform.forward * 50); // Forward impulse
        rb.ApplyTorqueForce(new Vector3(0, 0, 40));      // Fall force
    }
    public void Shoot()
    {
        rb.UnLockTransform();
        Vector3 force = new Vector3(0, 5, 0);

        rb.ApplyImpulse(force + speed * 100); // Forward impulse
        rb.ApplyTorqueForce(speed * 40);      // Fall force
    }
Beispiel #3
0
 public void Shoot()
 {
     rb.ApplyImpulse(vfront * vel); // Forward impulse
     rb.ApplyTorqueForce(new Vector3(0, 0, 40));
 }