how do I stop a dynamic rigid body from moving??

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
kirado2
Posts: 7
Joined: Thu Jul 20, 2006 11:23 am

how do I stop a dynamic rigid body from moving??

Post by kirado2 »

I have a cube that hits the ground.. when it hits it gets moved via a script to an empty.. I want the cube to stop moving.. but when it gets moved it carries on simluating the rigid body physics.. i.e. it maintains it mommentum and anlgular velocities etc.. well I want it to stop and hang there for a while then drop down to the ground and start moving again like a rigid body..

the problem I have is that the gamelogic object only has a getvelocity method but no setVelocity method.. there is no way for me to set the velocity of the gameobject without resorting to using a motion actuator.. which only sets the forces (linv,force,Drot etc etc) being applied to the gameobject the actuator.. so effectively i can't set the velocity of the gameobject to be 0.. do you know of anyway of stopping and starting a dynamic rigid.. by removing it's velocity (i.e. not by suspending the dynamics)??

are you planning on having a setVelocity method for the gamelogic object?

thanks in advance for any input you would have on this.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: how do I stop a dynamic rigid body from moving??

Post by Erwin Coumans »

kirado2 wrote:I have a cube that hits the ground.. when it hits it gets moved via a script to an empty.. I want the cube to stop moving.. but when it gets moved it carries on simluating the rigid body physics.. i.e. it maintains it mommentum and anlgular velocities etc.. well I want it to stop and hang there for a while then drop down to the ground and start moving again like a rigid body..

the problem I have is that the gamelogic object only has a getvelocity method but no setVelocity method.. there is no way for me to set the velocity of the gameobject without resorting to using a motion actuator.. which only sets the forces (linv,force,Drot etc etc) being applied to the gameobject the actuator.. so effectively i can't set the velocity of the gameobject to be 0.. do you know of anyway of stopping and starting a dynamic rigid.. by removing it's velocity (i.e. not by suspending the dynamics)??

are you planning on having a setVelocity method for the gamelogic object?

thanks in advance for any input you would have on this.

It might be not possible. I will add the setLinearVelocity/setAngularVelocity on the todo for next release.

Thanks for the feedback,
Erwin
kirado2
Posts: 7
Joined: Thu Jul 20, 2006 11:23 am

Post by kirado2 »

Hi Erwin thanks for the reply.. keep up the good work.