Answer the question
In order to leave comments, you need to log in
How to move a character relative to local coordinates?
I want that when I turn the joystick (Hold the button left or right) my character spins around its axis, with this code it just goes in one direction according to the world coordinates (Control should be the same as in any 3D third-person game). Initially, I thought that replacing the AddForce method with AddRelativeForce would solve this problem, but it turned out not to be so.
Answer the question
In order to leave comments, you need to log in
_moveVector = tranform.forward;
_moveVector += new Vector3(_joystick.Horizontal * _speedMove, 0, _joystickVertical * _speedMove);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question