Search Unity

Move an Object in an specific direction unsing Rigidbody.Velocity

Discussion in 'Physics' started by bgfxc4, Sep 6, 2019.

  1. bgfxc4

    bgfxc4

    Joined:
    Sep 6, 2019
    Posts:
    1
    Hello, i have created an mobile game which is unsing an Joystick. You can rotate the camera but the Player is Always moving the same direction: rigidbody.velocity += new Vector3(joystick.Horizontal * 0.09f, 0, joystick.Vertical * 0.09f); how can I move the player in the viewing direction ?