|
Ok i am new to Unity so this may seem like a stupid question: I have bought some fbx models with whicj i attend to make a 2D game. To be able to use hte models the way i want, i have to rotate them 270 deg in the x-axis. From that i point on during the game i want the model to rotate in the z-axis to simulate a steering movement. But when I do it (I use : gameObject.transform.Rotate(0,0,-Time.deltaTime*radialVelocity, Space.World), the effect i get is not what i want. When i rotate the fbx either from the iterface or using code w.r.t it self i get even stranger results. Basically my question is that after i rotate the model in the x-axis how to i make rotate on its z-axis without causing it to rotate in any other axes.
(comments are locked)
|
|
Want to rotate the model in the Z axis? If i do this my model will rotate in its y-axis (remember the model is already rotated in x). If i do transform.eulerAngles.y ... , it will again in the y axis. Strange e? If i try to rotate in the x :transform.eulerAngles.x ... ,it will rotate in the x-axis as it should. Its only the z-axis that has a problem. Note that if i dont rotate the model (just drag it in the hierarchy view ) and i rotate through code usuing transform.eulerAngles.y ...in the y-axis , i get the effect i want . Why is it trhat i get this problem with the z?
Apr 03 '11 at 03:53 PM
user-8564 (google)
I am sorry that my question did not aid you, and I really have no clue how I can further help you besides telling you that it sounds like your x,y and z axis is messed up.
Apr 03 '11 at 04:54 PM
OrangeLightning
(comments are locked)
|
|
in your 3d modelling software you need to alter the pivot point of the object BEFORE you animate and/or import it into unity. I've had the exact same problems, seen it loads of times, and loads of people have asked this same question, next time try looking for the answer via google or the archives of this site instead of polluting it with already overly asked questions.
(comments are locked)
|
