- Home /
Question by
e-bonneville · Jan 28, 2011 at 04:56 PM ·
rigidbodyaddforce
AddForce doesn't work?
Why won't this script work? It seems perfectly reasonable to me.
private var canKill = false;
function Destroy () { rigidbody.isKinematic = false;
rigidbody.AddForce(0,10,0); canKill = true; }
function OnBecameInvisible() { if (canKill) { Destroy(gameObject); } }
When I call Destroy(), my object should jump in the air then disappear when my camera doesn't see it, but it doesn't jump. Is it because I'm calling it too soon after setting the rigidbody to non-kinematic?
Thanks - Elliot
Comment
Your answer
