Hey, can you help me how to make a rigidbody script. When you enter the trigger, rigidbody in this (gameObject) will enable
I know there should be a var of object but I don’t know rigidbody part …
Hey, can you help me how to make a rigidbody script. When you enter the trigger, rigidbody in this (gameObject) will enable
I know there should be a var of object but I don’t know rigidbody part …
Make a trigger and attach this script:
var yourObject : GameObject;
function OnTriggerEnter(Other : Collider){
if(Other.gameObject.tag == "Player"){ //Be sure to tag your player to "Player"
yourObject.rigidbody.enabled = true;
}
}