I am making a physics based controllable Rolling Ball (Not a humanoid).
I want it, so that when player holds W (or thumbstick Up), the ball rolls the forward direction of the camera. And the same with all other directions, and their combinations (A,S,D, thumbstick equivalent).
Now since camera can be looking down or up, and I don’t want to apply impulse up or down, I’m making a rotator with X = 0, Y = 0, Z = Camera World Rotation.
Now how can I combine this with the input 2D vector (X and Y with a range of -1 to 1), to make the ball roll in the correct direction?
I tried multiplying the forward vector of that 0,0,camZ rotation with the input vector2D, but it doesn’t work correctly.
Or if you didn’t understand what I wrote above, you can basically explain to me how is Humanoid.MoveDirection calculated under the hood.