WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-31-2010, 02:08 PM
c4am95 c4am95 is offline
Member
 
Join Date: Mar 2010
Posts: 16
World Transformations

Hello. I'm using an HMD and intersense tracker. Code-wise, I use methods like "link.postTrans", etc. to apply virtual world transformations when using the HMD directly. However, I want to use the environment for testing as well, so I'm trying to find an easy way to apply world transformations without the tracker. It's surprisingly not as easy as I thought it would be. How could I, for example, rotate the entire world 180 degrees so that the camera is situated in the same position and now facing the other way, but the virtual subject it represents hasn't physically turned around?
Reply With Quote
  #2  
Old 11-02-2010, 12:32 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can link the viewpoint to a mouse/keyboard tracker and apply a link operator to that:
Code:
import viz
viz.go()

gallery = viz.addChild('gallery.ive')

import viztracker
tracker = viztracker.KeyboardMouse6DOF()

link = viz.link(tracker,viz.MainView)
link.postEuler([180,0,0])
Does this do what you want?
Reply With Quote
  #3  
Old 11-07-2010, 11:53 AM
c4am95 c4am95 is offline
Member
 
Join Date: Mar 2010
Posts: 16
this could work. but how do you change the properties of viztracker? for example, if i only want movement in x and z (no flying), how do i reduce the degrees of freedom?
Reply With Quote
  #4  
Old 11-08-2010, 09:10 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Does the following work for you?

Code:
import viz
import vizact

viz.go()

gallery = viz.addChild('gallery.ive')

import viztracker
tracker = viztracker.KeyboardMouse6DOF()

fixedTracker = viz.addGroup()

link = viz.link(fixedTracker,viz.MainView)
link.postEuler([180,0,0])

def updateView():
	x,y,z = tracker.getPosition()
	fixedTracker.setPosition(x,1.8,z)
	fixedTracker.setEuler(tracker.getEuler())

vizact.ontimer(0,updateView)
Reply With Quote
  #5  
Old 11-09-2010, 12:50 PM
c4am95 c4am95 is offline
Member
 
Join Date: Mar 2010
Posts: 16
yeah that works well. albeit, it made the eyeheight incredibly high for some reason. when i used instead:
fixedTracker.setPosition(x, 0, z)
it looked normal. bizarre?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
why is time faster in my virtual world? billjarrold Vizard 1 11-24-2009 05:33 PM
What are the options for making a movie of a Vizard world? Karla Vizard 1 05-13-2008 10:56 AM
Pre/Post transformations pattie Vizard 5 10-02-2006 04:20 PM
General Questions about Vizard: World Viz dav Vizard 5 08-28-2006 03:44 PM
Avatar bone rotations respect to world MiamiTodd Vizard 3 02-14-2006 10:41 AM


All times are GMT -7. The time now is 03:30 PM.


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