Answer the question
In order to leave comments, you need to log in
How to organize the movement of the character based on the incoming Vector3?
All the best!
Here is a code snippet that makes an object move:
Vector3 InputVector = joystick.GetInputVector();
this.gameObject.transform.position += InputVector * 3 * Time.deltaTime;
Answer the question
In order to leave comments, you need to log in
For such purposes, Transform.TransformDirection is suitable . The joystick gives you direction in local character coordinates, and you want to change world coordinates. Take the vector from the joystick, transform it with TransformDirection, and then use the new vector as before.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question