PDA

View Full Version : Collision Trouble with Omni Device


vNicolef
09-30-2008, 05:58 PM
Hi there,

I'm currently using a haptic device (the PHANTOM OMNI) and haven't had any problems with it until now. When I set the marker to be a shovel, for example, the shovel twists and moves as I move the haptic device. However, when the shovel runs into another object, only the origin point of the shovel (which is in the middle of the shovel) collides with the object while the handle of the shovel moves freely, without collisions, through the object. How can I enable collisions for the whole shovel? I already tried shovel.collideBox(), but then there was a gravity problem where the shovel would move with the haptic device and fall at the same time. So then I tried shovel.collideBox() and shovel.disable(viz.DYNAMICS). This fixed the gravity problem, but the Shovel handle still won't collide with another object. What should I do?

Thanks,
Nicole

farshizzo
10-02-2008, 12:32 PM
The OpenHaptics plugin will only apply forces to the marker point. Attaching meshes to the marker will not affect the forces applied to the device, it will still be treated as a single point.

If you just want the shovel to not visually go through objects, then you can use a physics spring to link the haptic pen to the shovel. Have a look at the following post for example code, http://www.worldviz.com/forum/showthread.php?t=1570