Hello, I’ve been having trouble with unfreezing the X and Z on my rigidbody through a script. In my script, I would like the X and Z position to unfreeze when the enemy detects the player.
Thank you
First Unfreez all
Rigidbody.constraints = RigidbodyConstraints.None;
Then freez back which you don’t want to be unfreezed
Rigidbody.constraints = RigidbodyConstraints.FreezePositionY;
Please accept it if it works