#1
|
|||
|
|||
pick intersect point in object coordinates
Is there a way to get the intersect point when picking using
Code:
viz.pick(info=True) |
#2
|
|||
|
|||
The command returns a point in global coordinates but you could convert this into local coordinates of the object that is picked:
Code:
import viz import vizact viz.go() viz.addChild('piazza.osgb') ball = viz.addChild('beachball.osgb',pos=[0,1.5,3]) def updatePick(): info = viz.pick(info=True) if info.object == ball: print 'global',info.point helper = viz.addGroup(parent=ball) helper.setPosition(info.point, viz.ABS_GLOBAL) print 'local',helper.getPosition() #mode defaults to viz.ABS_PARENT vizact.ontimer(1,updatePick) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
viz intersect object point | chris2307 | Vizard | 1 | 10-10-2014 02:31 PM |
animate an object using 5dt data glove 5 ultra | agrima | Vizard | 3 | 07-01-2014 11:17 AM |
Find collision point of line and arbitrary object | asdf | Vizard | 2 | 01-28-2013 10:04 AM |
how to pick up the object, move and rotate using mouse | nasr | Vizard | 5 | 05-05-2009 03:11 AM |
Getting object position in screen coordinates | v-Salik | Vizard | 1 | 10-19-2007 03:41 PM |