#1
|
|||
|
|||
Collision?
Hi. I need a little help. I believe collisions is what I need to use, but I'm not sure how.
I need to make a world with a box with holes of different sizes and I want the user to pick up a screw using the haptic pen and be able to screw it into th ebox. I only want the screw to be able to go through in the right sized hole. Right now the screw can go through the box anywhere! I set the hardness of the box to be 1 on the haptic device, so the haptic pen can't get through the box but if the screw is bigger than the marker of the pen then it just goes right through. How can I achieve the effect I want? Should I somehow manually get the colliding object of the screw and box and do the math myself to figure out when they intersect or is there an easier way? Thanks so much! |
#2
|
|||
|
|||
Hi,
I don't think OpenHaptics supports arbitray shapes for the pen, it can only be a point. You can use Vizard collision routines to detect when the two objects are touching and manually apply a force to the haptic pen. Take a look at the viz.phys.intersectNode command for detecting collisions. For applying forces to the haptics pen take a look at the downloads page under "Hardware Support". There is a "Haptic Effects" download. It contains some example of using certain haptic effects, which includes applying a constant force. You DO NOT need the modified hd.dlm/hd.py plugin that is included with the zip file, it is only for Vizard 2.5. |
#3
|
|||
|
|||
Sweet. Thanks for the reply. I'll look into those options. This is more complicated than I thought!
|
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
Hi,
Are you enabling physics? If you just want to perform collision tests there is no need to enable physics and disable dynamics. Also, can you post a simple script that reproduces the problem. If you wish, you can send the files directly to me at lashkari@worldviz.com |
|
|