Hi,
I’ve got a model,
that has a script attached to it,
three thing are going on.
transform.eulerAngles.z = 23;
transform.position.x = jointb.transform.position.x;
transform.position.y = jointb.transform.position.y;
Debug.Log (transform.localEulerAngles.z);
I am basically parenting the model manually to an other Game Object, that is defined in a function Start. The problem I have is that whenever I try to change the euler Angles or the local Euler Angles, the model starts spinning like crazy around the world y axis, no matter what number I write.
I’ve tried everything I could think of.
And instead of seting the angle value, it’s as if it was incrementing the value every cycle.
The reason I am using this instead of rotate, is because my goal is to set the .z angle using (Mathf.Atan2(jointp.transform.position.y, jointb.transform.position.x) *Mathf.Rad2Deg)
Before I imported this model, it worked fine with a placeholder.
Any help is welcome.