I am trying to disable the rigidbody constraints on my project on the click of a button, but I’m havbing a bit of trouble.
So far this is my code:
var constraints : RigidbodyConstraints;
function Update () {
if(staticvar.cleardisc == true) {
print("working");
constraints = FreezeNone;
}
}
So the code does print “working” which means the static variable is fine, however I’m not sure what I should write to make all the constraints disappear. I’ve tried constraints = false and constraints = 0 too but it didn’t help me
Any help would be appreciated