#1
|
|||
|
|||
Moving main viewpoint when linked to PPT
I'm currently debugging an old falling-into-a-pit demo; the problem is that the viewpoint does not actually move downwards when the user 'falls' into the pit.
I initially set up PPT tracking like so: Code:
vrpn = viz.add('vrpn7.dle') ppt = vrpn.addTracker('PPT0@' + PPT_HOSTNAME) filter = viz.add("filter.dle") ppt = filter.average(ppt, samples = 5) view = viz.MainView link = viz.link(ppt, view) link.reset(viz.RESET_X|viz.RESET_Y|viz.RESET_Z) viz.eyeheight(0.0) Code:
fallV -= 9.8 * viz.elapsed() # fallV is initialised at 0 when the fall begins viz.translate(viz.HEAD_POS,0,fallV*viz.elapsed(),0) This may also have something to do with the fact that this demo was written during our serial PPT days, and the update to make it work with VRPN may not have ironed out all the kinks. Any ideas? Thank you! |
#2
|
|||
|
|||
When the viewpoint is linked to the tracker trying to set it's position will not have any effect. In your timer function that moves the view down you could do something like:
Code:
link.reset(viz.RESET_OPERATORS) link.postTrans([0,fallV,0]) Code:
link.reset(viz.RESET_OPERATORS) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to track the actual viewpoint | Jerry | Vizard | 3 | 05-25-2016 10:44 AM |
Avatar w/ hat cannot look at viewpoint | TrashcanPatrol | Vizard | 5 | 08-19-2008 09:26 AM |
3d viewpoint movement | spacefarer | Vizard | 9 | 07-25-2006 04:37 PM |
moving viewpoint vs. translating Head_pos | bailenson | Vizard | 5 | 02-01-2005 02:51 PM |
VRML Viewpoint error | bstankie | Vizard | 1 | 03-11-2003 03:10 PM |