changing object rotation in unity
Go to solution
Solved by Spudwell06,
I have been making a basic car game, and once the car is upside down, it flips over.
i tried using:
transform.Rotate(0,0,0);
however it did nothing
I would like it to set the x and z axis to 0 and leave the y alone (as this is it's direction)
how would i do it?
SOLUTION:
transform.rotation = Quaternion.lookDirection(transform.forward)
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now