CCD and NoSolver interaction
Posted: Tue Nov 01, 2011 6:31 pm
Our player character moves pretty fast relative to the size of the time steps we can afford, so we were experiencing problems with tunneling through walls. Setting PositionUpdateMode = PositionUpdateMode.Continuous resolves the problem, but creates another. We have a lot of kinematic entities with NoSolver set that we use as trigger regions (level checkpoints, camera regions). When the player character passes through any of these, motion becomes discontinuous. For example, starting above a trigger region and falling into it, the character briefly pauses while passing through the trigger region. It looks like the code path for continuous updates gets time of impact for all collision pairs, finds the smallest time of impact and updates the entity up to that time of impact. I guess this makes sense, since it prevents the character from skipping entirely over a collision region (and obviously makes sense for something solid), but pauses in movement are unacceptable for our game. It also has significant ramifications on gameplay--jump height is inconsistent, since jumps passing through triggers will have their deltas cut short.
I'm just checking in to see if this is all working as intended and to see if you have any suggestions for solutions. One idea we had was to add a proxy object for detecting collisions between the player and trigger regions and disable collision detection between the player entity and trigger entities.
I'm just checking in to see if this is all working as intended and to see if you have any suggestions for solutions. One idea we had was to add a proxy object for detecting collisions between the player and trigger regions and disable collision detection between the player entity and trigger entities.