WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-05-2008, 05:17 AM
joeymax joeymax is offline
Member
 
Join Date: Apr 2007
Location: England
Posts: 11
teleport users location

Hi there,

Is there a way to teleport your location to a different part of your scene at the touch of a button:

For example…
Code:
theview = viz.get(viz.MAIN_VIEWPOINT)
theview.translate(0,5,0)

POSITION = 0

def mytimer(num):
	global POSITION
	if POSITION == 1:	
		theview.translate(1,0,1)

	if viz.iskeydown('e'):
		POSITION = 1
..now I know this code doesn’t really work, but hopefully you can see what ive tried to do.

Any help would be much appreciated
Reply With Quote
  #2  
Old 05-05-2008, 12:22 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
What you have should work. If you have collision enabled, then you will need to temporarily disable collisions when teleporting the viewpoint.
Code:
viz.collision(0)
viz.MainView.translate(1,0,1)
viz.collision(1)
If you have linked a sensor to the viewpoint, then you will need to apply an offset to the link, instead of translating the viewpoint.
Reply With Quote
  #3  
Old 05-05-2008, 03:49 PM
joeymax joeymax is offline
Member
 
Join Date: Apr 2007
Location: England
Posts: 11
thankyou!! it works perfect now
Reply With Quote
Reply


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
Gps input for viewpoint location? realvision Vizard 3 03-19-2008 12:37 PM
For users with a floating license: Adding Vizard License Server as a Service mspusch Vizard 0 03-03-2006 11:36 AM
dynamic access of avatar location valhalla Vizard 1 09-13-2004 08:28 PM


All times are GMT -7. The time now is 07:34 AM.


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