[ODE] Creating a FPS Collision Motion Model

Anderegg, Bradley (Brad) (CIV) bgandere at nps.edu
Thu Sep 7 15:34:52 MST 2006


Hi, 

 

I am a Delta3D developer (delta3d.org) and am in the process of creating
an FPS motion model that uses collisions to guide its motion.  

 

I have two collision volumes, a bounding box for the feet which dictates
its height above the ground, and a bounding box for the body that is
used to collide with walls and vertical obstacles.  

 

In order to allow the player to slide along the wall, we take the
dContactGeom from the collision with the upper bounding box and for each
contact point we project our current velocity onto the collision normal
and subtract that from the velocity.  We then do another collision test
with the new point creating with the modified velocity and the time
step, if that doesn't collide with anything, we are ok, otherwise we
return the player back to the last valid position.  

 

Everything works fine until we hit a triangle edge with trimesh
collisions or the end of a box with a BB collision volume.  At this
point we get a collision normal that is opposite in direction to our
velocity and we come to a stop.  It appears that ode is "saying" the
easiest way to resolve the collision with the new triangle (picture a
long wall which has a seam in the middle between two triangles, this is
where we get into trouble) is to move backwards, which seems entirely
correct.  

 

Does anyone have any ideas for processing collision messages that would
allow the bounding volume/player to slide along the wall?  

 

Brad

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060907/9eaef38d/attachment.htm


More information about the ODE mailing list