Picking up Vizard Objects on mouse down with collisions
I'm trying to pick up vizard objects using a vizshape sphere as an end effector.
Because I have multiple objects I'm using onCollideBegin to grab the objects when the end effect collides with the object to be picked up. This work fine but the end effector doesn't let go of the object and it is automatic, however I want to be able to pick up objects when I touch them and hold them as long as the left mouse button is pressed. Releasing the object once the left mouse button is released. I have the below code in my updateview method: Code:
def onCollideBegin(e): Many thanks. |
Here's an example that uses viz.phys.intersectNode to determine if the hand and object are intersecting. If they are intersecting and the mouse event occurs the object will be grabbed:
Code:
import viz |
Excellent, works like a charm.
Many thanks again! |
All times are GMT -7. The time now is 03:19 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC