freezeRotation = false; removes all rotational constraints
this seems like it was an oversight, So i tried fixing it with some googling help.
what i did was to add in a long and complicated line of code with “pipes” afterwards, this however feels a little messy and long, is there a way to shorten it? is there maybe something i missed out on that prevents the freezeRotation = false line from removing what had been set previously in the editor?
Heres the line i added :
rb.constraints =
RigidbodyConstraints.FreezeRotationX|RigidbodyConstraints.FreezeRotationY|RigidbodyConstraints.FreezePositionZ;