WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Precision Position Tracker (PPT) (https://forum.worldviz.com/forumdisplay.php?f=9)
-   -   Jitter & gradual decline in y value (https://forum.worldviz.com/showthread.php?t=4084)

nihohit 12-20-2011 03:44 AM

Jitter & gradual decline in y value
 
1 Attachment(s)
Hey,
I'm using the code

def updateView():
pptPOS = tracker.getPosition()
viz.MainView.setPosition(pptPOS)

vizact.onupdate(viz.PRIORITY_DEFAULT, updateView)

and later on, in a different function

viewPOS = viz.MainView.getPosition()
head.lookat(viewPOS,5,viz.AVATAR_WORLD)
neck.lookat(viewPOS,5,viz.AVATAR_WORLD)

which is a simple code to make the avatar look at the main POV.

Alas, the code doesn't work. When the function needs to be called, the avatar's head jitters and gradually descends, until the helmet moves significantly, when it jumps back up and then returns to the jitter-and-descent routine.

Attached in the files is a graph of the result of getPosition over time - notice that the Y line is gradually descending and more jittery then the other lines - which makes me believe this isn't a problem with the code.

Any ideas?

Jeff 12-20-2011 09:48 AM

How did you generate the graph, I'm not able to tell from looking at that how much the Y position changed?

Can you post a simple example script that replicates your problem?

Do you notice any jitter with the viewpoint or that the viewpoint is dropping over time? If not, there's probably some problem with the code.

nihohit 12-21-2011 01:35 PM

The view doesn't jitter and move. The graph was made using print viz.MainView.getPosition() every frame, and the decline is from ~1.3 to ~0.3.

I will copy the code when in the lab.


All times are GMT -7. The time now is 10:02 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC