View Single Post
  #3  
Old 01-10-2013, 12:07 PM
jpriede jpriede is offline
Member
 
Join Date: Dec 2012
Posts: 10
PowerWall example (modified)

Using the example from:
http://docs.worldviz.com/vizard/vizcave_powerwall.htm

I added the line:
cave.drawWalls()

I then ran it, and moved around with the WASD keys, and the powerwall appeared static, with the view frustrum changing (exactly as a cave should behave).

However, looking at the code there is a spot I don't understand:


"""
Create CaveView object for manipulating the virtual viewpoint.
cave_origin is a node that controls the position of the cave within the virtual world.
For example, if you wanted to simulate the cave user flying through an environment,
you would apply the transformation to the cave_origin node.
"""
cave_origin = vizcave.CaveView(head_tracker)

Why would the cave origin rely on where a head tracker is located? Is that not what the above line implies? Wouldn't the cave origin be static, regardless of where a users head location is?

I tried commenting out the cave_origin associated lines

#cave_origin = vizcave.CaveView(head_tracker)
#origin_tracker = viztracker.KeyboardMouse6DOF()
#origin_link = viz.link(origin_tracker, cave_origin)

To me, I wold expect this to still work properly, as I have a cave whose origin is static, I have a head tracker, and my head tracker can move.

However, if I run it without the cave_origin tied to head tracker, it doesn't appear to work properly.

It seems to me, that this means that behind the scenes, what is happening if the head-tracker position updates, is that the camera stays in the same place, but the FOV changes, instead of moving the camera, as well as adjusting the FOV.

From this, it looks to me like the origin of the CAVE co-ordinates is based on where the current head tracker is located... I think?

I'm just having trouble understanding why the cave_origin is linked to the head tracker location, since in practice, the CAVE does not move when a user moves around their head.
Reply With Quote