WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-14-2006, 09:37 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

No, there is currently no way for an object to physically move the viewpoint, you would have to calculate this manually.

The best way to simulate a platform would be to create a timer when the user steps on to a platform, and then kill the timer when the user steps off. The code inside the timer would simply perform a relative movement of the view in the direction of the platform. Example:
Code:
def StepOnPlatform():
    #Start a timer

def StepOffPlatform():
    #Kill timer

def ontimer(num):
    if num == PLATFORM_TIMER:
        v = platformVelocityVector * viz.elapsed()
        view.translate(v.get(),viz.RELATIVE)
The code above is just an outline. platformVelocityVector should be a vector describing the speed and direction that platform is moving in.
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


All times are GMT -7. The time now is 10:46 PM.


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