x


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.

more ▼

asked Mar 02 '12 at 02:22 PM

Marsallima gravatar image

Marsallima
31 20 24 25

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.

Mar 02 '12 at 02:27 PM Kleptomaniac

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

Mar 02 '12 at 04:41 PM Owen Reynolds

Once the weapon is caught it needs to rotate instantly -90 :x

Mar 03 '12 at 03:28 PM Marsallima

Have you tried transform.eulerAngles? They seem more reliable to me.

Mar 03 '12 at 03:34 PM OrangeLightning

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.

Mar 03 '12 at 04:02 PM Owen Reynolds
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2165
x1172
x724
x576
x439

asked: Mar 02 '12 at 02:22 PM

Seen: 747 times

Last Updated: Mar 03 '12 at 04:02 PM