Mouse-drag an object
What's the best way to click on and mouse-drag an object
around the screen so that the object stays under the cursor? |
In 3.0 you can link to a viz.Mouse linkable object. If the objects you want to drag are on the screen you could do a viz.grab( viz.Mouse, myScreenObj ) when you click on the object. This viz.grab() function would maintain the place where the mouse grabbed the object.
Also, you can do this all manualy. The vizinfo object does this and because it is implemnted in python all the code is there for you to see. Open the Vizard30/python/vizinfo.py file and search for "drag." |
Here is a sample script that should work with 2.5
Code:
import viz |
All times are GMT -7. The time now is 07:31 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC