![]() |
|
#1
|
|||
|
|||
Here's an example that prints out the viewpoint velocity each frame:
Code:
import viz viz.go() viz.addChild('piazza.osgb') lastPos = [0,0,0] def calculateVelocity(): global lastPos pos = viz.MainView.getPosition() distance = vizmat.Distance(lastPos,pos) velocity = distance/viz.getFrameElapsed() print velocity lastPos = pos vizact.onupdate(0,calculateVelocity) |
![]() |
Tags |
omni, velocity |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Information associated with a model | roobert | Vizard | 7 | 08-01-2014 09:34 AM |
MainView velocity depending on joystick deflection | 4711 | Vizard | 3 | 01-17-2014 12:50 PM |
velocity shader | subbu | Vizard | 0 | 11-24-2013 06:56 AM |
how to remove velocity when mouse is disabled? | jvacare1 | Vizard | 2 | 02-18-2010 10:25 AM |
How Can I use two SensAble Omni at the same time | junghungchien | Vizard | 0 | 09-03-2009 07:04 AM |