![]() |
|
#7
|
|||
|
|||
|
You want the position/pitch/roll of the box based on the viewpoint and the yaw of the box based on the sensor, correct?
If that's the case you could manually update the box orientation every frame in a function registered with vizact.onupdate: Code:
import viz
import vizact
viz.go()
box = viz.add('box.wrl', pos=[0,0,0])
plan = viz.add('tut_ground.wrl')
mySensor = viz.add( 'testtrack_all.dls' )
link = viz.link(viz.MainView, box, mask=viz.LINK_POS)
link.postTrans([0,0,6])
def updateOri():
yaw = mySensor.getEuler()[0]
pitch = viz.MainView.getEuler()[1]
roll = viz.MainView.getEuler()[2]
box.setEuler([yaw,pitch,roll])
vizact.onupdate(0,updateOri)
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to pass only 1 axis of the position signal from the source to the dest in a LINK? | Zhi | Vizard | 2 | 04-04-2013 07:28 AM |
| How can I link MainView with HMD and a 3d node? | Salvar | Vizard | 5 | 03-22-2011 08:14 PM |
| Link MainView to instable platform | sleiN13 | Vizard | 2 | 01-10-2011 12:33 AM |
| Remove link and have object drop/collide? | cgibb | Vizard | 6 | 03-02-2010 04:18 PM |
| Object rotating around world axis, not own axis | tacbob | Vizard | 1 | 02-15-2007 09:12 AM |