Temporal behavior of collision detection
I am trying to build a simulation using the Java3D geometry-based
To be able to reproduce the spatial state ob my models I rely on
deterministic timing properties of the collision detection.
Thus I registered WakeupOnCollisionExit and WakeupOnCollisionEntry
instances in a custom Behavior.
When moving an object, I expected the WakeupOnCollisionEntry to trigger
the processStimulus(Enumeration) method of the behavior on the next
frame. Which ist not the case.
It seems that processing these WakeupCriterions will only happen, if
there is not again a collision entry or exit on the next frame. If
there is, they seem to be collected.
A little example:
in frame 1 objects are moved so that a collision is made. If the
objects don't move in frame 2, processStimulus will be called in frame
If the collision is removed in frame 2, I will receive 2 notifications
during frame 3 (one CollisionEntry and one CollisionExit)
Can anybody confirm the observed behavior? And is there any way to get
notified on the next frame is the collision state is altered not matter
what happens afterwards?
So far, I am refreshing my object locations only on every other frame,
which obviously helps, but I cannot judge if this makes any noticable
impact on the simulation speed.
Comments are appreciated.