I’m trying to make a ball drop and be reset upon a certain key stroke. I have it reset its location by animating it to a key frame. My problem is the object retains the speed it has acquired due to the acceleration of gravity. I’ve found the “suspend dynamics” and “resume dynamics” options, but I haven’t found a way to reset the dynamics, or at least the object’s velocity due to gravity. Thanks in advance to anyone who can help me.
You can always use this kind of script:
#get object list list = GameLogic.getCurrentScene().objects #get object "ball" ball = list["OBball"] #set the velocity to 0 ball.setLinearVelocity([0,0,0],0)
combine that with the suspend dynamics, and it should reset the velocity to 0
And if you add ball.setAngularVelocity([0,0,0]) to that, it’ll stop any spinning as well.