- Home /
Rotating wrong
Hi guys I'm doing a system to pick up weapons on the ground, but is not working properly when it is to apply the rotation, For example, I set to stay Y -90 but it is 180 :/ Sorry for my english. Thanks.
So, which object's rotation are you referring to? When they are on the ground, when they have been picked up, etc? Also, whatever code snippets you already have would be helpful.
Things to check: are you using local or global rotate? Are you avoiding rotation.Euler.y
(it isn't made for rotating -- use Rotate
.) Is the model facing +Z with Y up, like Unity prefers? Is it the correct axis? (Y rotate spins you like a top.)
Once the weapon is caught it needs to rotate instantly -90 :x
Have you tried transform.eulerAngles? They seem more reliable to me.
The docs specifically say not to rotate using EulerAngles: http://unity3d.com/support/documentation/ScriptReference/Transform-eulerAngles.html . The two paragraphs just above and below the example.
Your answer
Follow this Question
Related Questions
Use Lerp to rotate object 2 Answers
Rotate object in the direction where it is going 1 Answer
Rotate a gameobject like car tire 2 Answers
w in Quaternion? 1 Answer
Unity Rotate Raycast on Quaternion 1 Answer