How do I stop a moving object?

How do I stop a non dynamic object?

If the object is not dynamic, i think nobody can stop it for you (press esc ! :wink: )
Try to change the “always” sensor by a “keyboard” sensor and assign
a key to make it move.

Or give us more information…

what do you mean stop? Remove from the scene or stop from moving…

If it is non-dynamic you coud just make sure that all the motionactuators are inactive… values set to 0 that ought to stop it, if you have no motion-actuators it shouldn’t be moving in the first place…

If it is dynamic, and it has some friction it should stop itself… if there aren’t any forces working on it.

If you want to remove an object from the scene you could make it invisible, I think you can also ‘kill’ something.

Carl

If you moved non-dynamic object using motion actuator, you have to create another motion actuator to stop it. In this stopping actuator set minimal speed (0.001). If all values in stopping actuator remain 0, actuator will do nothing.

I have a non dynamic object. when it collides with the ground it goes right through it. how can i stop it?

make it dynamic… non dynamic objects don’t detect collosion…

I think they do detect colisions… will try it again…

bleh, this is very simple … unintelligible questions

now then, only actors can move, so I assume the object you want to stop is an actor

how is it moving?

What are you trying to do?

dynamic objects restitute collisions (they bounce) ghost’s don’t (but they still fall if they are dynamic)

if you want to abruptly stop/resume the motion of an object you can use suspendDynamics or resumeDynamics on it (python, iirc these are functions of the object)

If you want to stop an object from falling through the floor, you must make it dynamic, and it can’t be ghost. Unless you want to code your own collision detection in python…

if youhave moved an object by applying a force how do you stop it

set the linear velocity to zero or set the linear velocity to the opposite of the current linear velocity (if you are adding to the linear velocity)

python, not tested:

act = GameLogic.getCurrentController().getActuator("motion")
obj = GameLogic.getCurrentController().getOwner()
linv = obj.getLinearVelocity()
act.setLinearVelocity(-linv[0], -linv[1], -linv[2],1)
GameLogic.addActiveActuator(act, 1)

where it is connected to a motion actuator named “motion”

ahhhh.

thats where i was getting it wrongi wasn’t addActiveActuator()'ing

thanks