Hello,

I've been using OSG for a number of years now and have read this list many 
times, but this is my 
first posting, so if I make a fool of myself, forgive me.

I'm trying to decide the best way to implement camera bumping/sliding in an OSG 
project for a 
client.  Basically, they will be adding simple, one sided collision primitives 
to a scene to an 
existing scene.  The primitives are currently limited to planes, spheres, 
boxes, and cylinders, but 
at some point in the future, I expect that more complex scenes will necessitate 
arbitrary collision 
meshes, so I don't want to completely discount that option.

I've put together some simple code that uses a line segment and the 
IntersectVisitor class, however, 
based on their needs, I'd like to be able to offer them better collision 
support than that.  I'd 
like the camera to behave as a sphere or cylinder (cylinder is preferable) when 
doing collision 
checks.  Also, in order to do camera sliding, I would need the normal vector at 
the point of 
intersection.

Here's the options I've seen:

1) DriveManipulator.cpp style line checks.
-What I'm using now.

2) PolytopeIntersector
-How does this option compare performance wise to option #1?
-Can't really do actual camera as sphere or cylinder collision, correct?  But 
could simplify it to 
box collision.

3) Custom Intersector
-Is it wise to consider a custom intersector for this?  Or would covering all 
the corner cases 
(collision against eye relative billboards) be a huge challenge?


I'd just like some advice from others who may have done this already before I 
decide.  I've seen 
discussions of this in the past on this mailing list, but I didn't find any 
discussion of this 
scenario specifically since the addition of the new Intersector classes about a 
year ago.

Thanks,
Z.S.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to