I have an issue with my javascript, I want to make non-kinematic an GameObject when another GameObject touch it but nothing happen, no error, etc. This is my Script :
var target : Transform;
var bullet : Transform;
function OnCollisionStay(collisionInfo : Collision) {
if(collisionInfo.gameObject == 'Bullet') {
var rb : Rigidbody;
rb = target.GetComponent(Rigidbody);
rb.isKinematic = false;
}
}
thanks for helping me.