WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 03-12-2006, 02:18 PM
Vmichaeljin Vmichaeljin is offline
Join Date: Sep 2005
Posts: 6
Is it possible for a colliding object to "push" the view?


I'm trying to design an object that collides with the view and pushes it in the direction of the object's travel. Is there any way to get collision detection to do this for me?

Another related question is whether there is any way to "link" the movement of the view with the movement of a moving object. For instance, consider a traveling platform. If the view collides with the platform (as in, the viewer jumps onto the platform), I want then to link the view to the platform, so that if the view was not disturbed by the user, it would travel along with the platform. However, it should still be possible to move around on the platform if the user desires. What would be the easiest implementation strategy for this?

Last edited by Vmichaeljin; 03-12-2006 at 02:25 PM.
Reply With Quote
Old 03-13-2006, 08:01 AM
halley halley is offline
Join Date: Oct 2005
Posts: 27
I'm just a Vizard user, but it appears that the answer to your first question is No. Vizard can tell if two objects are colliding, but the system would need to know (1) from what direction those two objects traveled to get there, and (2) in what direction the view should start looking or moving. You would have to make both of those decisions from the way your script works.

As for the second question, have you tried the .link() method? I am not sure if the argument to .link() has to be a motion sensor or it can be any compliant object, but try and see how it goes.

Personally, I would have an object which represents the actor, which gets moved around according to how the user commands, and also according to where the actor is standing in the environment. Then I would link the viewpoint to that actor. This seems to be a more flexible arrangement.
Reply With Quote
Old 03-14-2006, 10:37 AM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849

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:
def StepOnPlatform():
    #Start a timer

def StepOffPlatform():
    #Kill timer

def ontimer(num):
    if num == PLATFORM_TIMER:
        v = platformVelocityVector * viz.elapsed()
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

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 01:15 PM.

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