What is proper way to remove spatial and it's physics control? (Making Projectiles)

I want to make projectiles, that fly straight with certain speed. I searched hard, but didn’t found any tutorials or examples (will be thankful for any).

I’m sure, the best way is short ray-test, that checks segment between old and new position every physics tick. However, I failed making PhysicsTickListener work with anything besides RigidBodyControl, so by now, i ended up with it.

I also want bullets to disappear some time after they were shot.

My question is: how to properly remove Spatial and it’s control?

Is there any examples of projectiles, or other temporal physics things?

Yes, there is a “BombControl” in the examples.

Ok, I’ll look it more carefully. Thank you.

to properly remove a spatial and its controls. You need to remove the spatial from the scenegraph, and the controls from the physics space. They must all be done how you added them, not with physicsSpace.removeAll(spatial) (or whatever it is), (which doesn’t do what it says on the tin!!), normen? why not :slight_smile:

It removes all those the “addall” function adds, the problem is I can only scan for the base interface (PhysicsControl) and only get the first returned. utsl

Ok. I would uts, but I’m on my phone :slight_smile: