WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-17-2004, 11:07 AM
benelux benelux is offline
Member
 
Join Date: Jul 2004
Posts: 3
dynamic camera views

Hi,

I am trying to simulate a roller coaster ride. Is there a way to attach a camera viewpoint to a person riding up and down?

Thanks!
Reply With Quote
  #2  
Old 08-17-2004, 11:43 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I'm not sure if I fully understand your question. Do you already have some animation data for the roller coaster that you want to apply to the viewpoint, or are you wishing to create the data dynamically? Either way, you will need to apply some position and rotation to the viewpoint within a timer. Here is some sample code that might help:
Code:
viewpoint = viz.get(viz.MAIN_VIEWPOINT)

def ontimer(num):
	#Get the current position and rotation of the rollercoaster
	pos = getrollercoasterpos()
	rot = getrollercoasterrot()

	#Apply pos and rot to the viewpoint
	viewpoint.translate(pos)
	viewpoint.rotate(rot)
Let me know if I misunderstood your question or if you need any more help.
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


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


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