What I’m trying to do:
I’m trying to create a JME-based server that allows clients to independently register their own geometries and find out if they are colliding with other objects. The geometries and positions/orientations of these clients will be determined by physical hardware and the aim of the library is to predict and avoid real-world physical collisions. I am not interested in simulating physics in time steps, only collision detection. I am still very keen on using JME’s abstractions and graphical abilities in
SimpleApplication for debugging/visualization.
I have my own synchronous (i.e. non-threaded) implementation of
JmeContext which calls
update() on its
SystemListener when manually stepped after each
Spatial is added or moved. This works fine at the moment except I have to call call
update() about 10000 times to realiably trigger the collision event in my
PhysicsCollisionListener. I’ve tried experimenting with
bulletAppState.setSpeed() but to no avail.
To rule out timing/framerate issues I’ve tried using my own
Timer implementation that always returns 60fps or 1/60tpf to JME. Accurate time-scales shouldn’t matter since all my objects are kinematic. This does not seem to affect collision detection reliability.
Why do I have to call
SystemListener.update() so many times to actually trigger collision events in native bullet?