WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1  
Old 06-20-2008, 11:56 AM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
default start position

we're using keyboard commands to get around our environment. the default starting location is (0,0,0), but that location interferes with some things we have in the environment. we would like to be able to shift the starting position to another position we have defined.

here is the code we have tried so far. it will move the start position view, but then keyboard commands don't move. it also clearly thinks that it is the position (0,0,0) based on some sound commands that we have going. it doesn't give any error message.

Code:
elif keyControl == 2:
	headTrack = viztracker.Keyboard6DOF(forward=viz.KEY_UP,backward=viz.KEY_DOWN,turnRight=viz.KEY_RIGHT,turnLeft=viz.KEY_LEFT)
	link = viz.link(headTrack, view)
	viz.eyeheight(1.5) #sets the eyeheight for keyboard control to 1.5 m
	link.setPos(targets['home']['position'])
	link.setEuler(targets['home']['rotation'])
Reply With Quote
  #2  
Old 06-20-2008, 08:17 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Try replacing the following lines:
Code:
link.setPos(targets['home']['position'])
link.setEuler(targets['home']['rotation'])
with:
Code:
link.setOffset(targets['home']['position'])
link.postEuler(targets['home']['rotation'],target=viz.LINK_ORI_OP)
The setPos and setEuler operators will overwrite the source data with the specified value. The setOffset and postEuler operators will offset the source data instead.
Reply With Quote
  #3  
Old 06-23-2008, 09:15 AM
erchrastil erchrastil is offline
Member
 
Join Date: Feb 2008
Posts: 17
thanks, that worked well.
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
position of html-file on screen active_world Vizard 1 05-16-2008 08:24 PM
Default in wireframe semblance Vizard 1 10-16-2006 10:31 AM
How to get the position of a vertex Jerry Vizard 1 10-04-2006 12:28 PM
Avatar always returns in initial position pattie Vizard 2 08-31-2006 09:15 PM
Get position data in an own little program Researcher Precision Position Tracker (PPT) 2 02-01-2006 03:55 AM


All times are GMT -7. The time now is 10:45 AM.


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