![]() |
|
#2
|
|||
|
|||
|
You could use the viz.pick command to get the point of intersection between the mouse and the object it is pointing at. Here's an example:
Code:
import viz
import vizact
import vizshape
viz.go()
dojo = viz.add('dojo.osgb')
sphere = vizshape.addSphere(radius=0.1,color=viz.GREEN)
sphere.disable(viz.PICKING)
def moveSphere():
info = viz.pick(info=True)
point = info.point
sphere.setPosition(point)
vizact.onupdate(0,moveSphere)
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find collision point of line and arbitrary object | asdf | Vizard | 2 | 01-28-2013 11:04 AM |