- Home /
Rotation question.
The problem I'm running into is that after I freeze my object I want to set its position and rotation. How would I go about doing this? I need it to be instant so most of the rotate solutions I've been trying haven't been working. Similarly to how it's done in editor if you modify the x, y and z in the transform component.
this is my rigidbody freeze code. body.constraints = RigidbodyConstraints.FreezeAll;
Answer by Bucketloop · Sep 19, 2017 at 04:49 AM
Found the solution. It was my animation that was messing everything up so I just added a coroutine to delay the position setup as my character plays the animation. Also my navmesh component so I disabled that as well. I used this if anyone is interested.
transform.localRotation = Quaternion.Euler(0, 180, 0);
Your answer
Follow this Question
Related Questions
Object not responding to OnTriggerEnter() 2 Answers
Slowly increase motor.force 1 Answer
Player Prefs Dosen't work on android 0 Answers
Im having trouble using different scriptable objects in a script 0 Answers
i need help with my script 1 Answer