Answer the question
In order to leave comments, you need to log in
How to make a turn with the mouse?
I'm starting to work with unity how to make a turn after the mouse. If it's not difficult, could you attach the code. Thanks for the answers.
Answer the question
In order to leave comments, you need to log in
float speed = 5f;
void Update()
{
transform.Rotate( new Vector3(Input.GetAxis("Mouse Y"), Input.GetAxis("Mouse X"), 0) * Time.deltaTime * speed);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question