PDA

View Full Version : How do I get the Cave viewpoint location?


TopazFrost
02-17-2014, 03:15 PM
Hello,

I have another question about CAVE collision. I am using cView = vizcave.CaveView(...) for the view point.

I have one last collision problem. When going backward down a hill/stairs, the view point likes to get trapped underneath the hill/stairs. I think I can correct for it if I can get cView's Y value, but cView.getPosition() returns the joystick position or [0,0,0]. What is the call/mask needed to get the cView position?

I can't set the viz.eyeheight() any higher since I am already having trouble with colliding with the tops of doorways (which are at 2m).

TopazFrost
02-18-2014, 11:51 AM
One more item. I am getting a collision error from vizard, that I have no idea how to handle. It only happens when moving quickly through a opening vizAvatar door. It is:

File "<string>", line 1
viz.VizIntersect([1,23.610281,0.621243,-17.971189,-0.876875,-0.000000,0.480718,399,-1.#QNAN0,''])
^
SyntaxError: unexpected EOF while parsing

Jeff
02-20-2014, 05:23 AM
The following code showed the cave view position updates when added to the example script in Vizard's CAVE documentation:
def printPosition():
print cave_origin.getPosition()

vizact.ontimer(1,printPosition)

Have you linked or parented the cave view to another object?

TopazFrost
02-20-2014, 10:03 AM
I have not. Doing so made the view spin or froze the view point.

The bigger problem right now is the intersection error. How do I catch it so it does not crash the program?

TopazFrost
02-20-2014, 10:41 AM
I forgot...I am assuming that cave-origin is the cave's view point returned by vizcave.CaveView(...). That works correct until I collide with a wall, then it keeps going while the viewpoint stays still.

I have not linked it other than giving it a tracker.

TopazFrost
02-20-2014, 06:18 PM
Update on collision error. I happens when hitting a vizAvatar even when going slow and have it running on the HMD, but not all vizAvatar. It went away (I hope) after I removed the collision event handler. That is a problem since I need it for the CAVE.