|
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.
(comments are locked)
|

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 -- useRotate.) 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.