I’d like to know how to change the constraints of a gameobject’s rigidbody, in JavaScript.
For example when something of the “Sharp” tag hits this object, I want another object’s Y position constraint to be turned off so that it can fall freely after the hit.
public var lug : GameObject;
function OnTriggerEnter (other : Collider) {
if(other.tag == "Sharp"){
lug.rigidbody.Constraints.FreezePositionY;
Destroy(gameObject);
}
}