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;

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