Hello Dave,
> This goes with my other question
> relating to moving something around. Once I determine that the wand is
> inside a model, then I want the model to follow the wand around.
What I used to do for the wand was to create a small sphere that would
always be at the wand's position, and a short line (in my case, it was
about a foot long in real-world units) going from the sphere forwards.
The user would see those and that would give them a visual reference
of where the wand is in the virtual space (though it breaks immersion
a bit, but not too much).
Then, when the user clicked the wand's button (click-hold and drag was
the action to move an object around) I would do a raycast with a
LineSegmentIntersector (or the equivalent back then) whose start was
the wand's position and whose end was the end of that line from before
(so start = wand_position and end = wand_position + length *
wand_orientation). If the intersection returned a hit, I'd retrieve
the object that was intersected and get its parent (the associated
transform node) and transform that with relation to the wand's
movement until the button was released.
The general feeling of the system was that the user was grabbing an
object by "poking" it with the protruding line, as if you were poking
an orange with a skewer or knife and then moving the orange. That
might not be an appropriate metaphor for your use, but it at least can
give you a starting point.
Good luck, and sorry for being a bit verbose...
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://whitestar02.webhop.org/
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org