View Single Post
  #3  
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