On 8/25/06, Manuel A. Fernandez Montecelo <[EMAIL PROTECTED]> wrote:
I haven't maintained the sourceforge website for a number of years as its just a pain in the butt to work with, and am busy enough with other work. I have requested that sourceforge remove the project entry for the openscenegraph but alas this seems to have been swallowed up in a support black hole. This is very frustrating as its totally unrepresentatve of the project.
I was trying to investigate about this in bug reports or something, but the
SourceForge net site seems to old and unmaintained, I assume that it's not
used anymore. I googled for info about this, but no luck.
I haven't maintained the sourceforge website for a number of years as its just a pain in the butt to work with, and am busy enough with other work. I have requested that sourceforge remove the project entry for the openscenegraph but alas this seems to have been swallowed up in a support black hole. This is very frustrating as its totally unrepresentatve of the project.
What I'm trying to do is to get a simple system for collision detection, with
one entity (player) against objects everytime I move. Basically, I create a
segment starting in the current position, with other extreme being the
position that I would reach when moving (depending on time elapsed since the
key is pressed, etc). This kind of works, but sometimes I can get though the
walls, and in addition the player has half of the body in the wall (because
the source of the ray is inside the stomach, so to speak :) ).
The problem with the latter effect is that even if I set the other extreme of
the ray to be far away (from 1m to tenths, making sure that the extreme
coordinates are correct and so on), it doesn't seem to be intersecting until
I get pretty close to that object (say, a few centimeters), so it's as if it
only considered the ray for short distances (because it continues detecting
the intersection and everything). Maybe I'm missing something, and this
behavior correct?
I also tried to get this with BoundingBoxes and BSpheres by creating a derived
class of NodeVisitor to check, the latter are not appropriate and they seem
to be centered in Vec3(0,0,0); and the former are not valid() when I check
them (so I assume that they're only calculated for some of the geodes, not
all).
I would appreciate some help with this, specially about the behavior of
IntersectVisitor or for better ways to achieve this.
PS: I'm using 1.0.0, in the case that this has changed lately in newer
versions.
Ray intersection testing will always be a bit crude for the types of interactions you are look for, so you may well be better looking into a specialist collision detection code or physics engine to help you out.
The IntersectVisitor itself is known to have precision problems, but this really only comes to the fore when working at whole world models when the units are very large. For small models with a nearby local origin you shouldn't have too many problems. Perhaps what is stinging you is that the hits are return both in local coords to the object and in world coords.
Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
