WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-21-2004, 09:59 AM
vr_boyko vr_boyko is offline
Member
 
Join Date: Sep 2004
Posts: 19
Animating an out-of-body transition

greetings!

I would like to construct an animation that swings the viewport around to look at the avatar representing the person who is looking through the viewport while moving away to a pre-determined position external position, a sort of an out-of-body experience. Currently I am trying to achieve this by using the commands:
<viewpoint>.goto(x,y,z,vel)
and
<viewpoint>.lookat(x,y,z)

my actual code looks like this:

def outofmymind(): # animate a smooth POV transition
global myAvatar
myApos = myAvatar.get(viz.POSITION)
myPOV = viz.get(viz.MAIN_VIEWPOINT)
myPOV.lookat(myApos)
myPOV.goto(5,5,5,.85) #just an arbitrary external place


however, instead of going to (5,5,5) in about 2 seconds while looking at myAvatar, the viewport just sinks down (-y)

any comments on my (apparently wrong) code and any suggestions for improvement are very appreciated.

Thanks!

btw, what formatting do you use especially for code, and how do I access it from "post new thread" webpage (is it in enhanced mode?)
Reply With Quote
 


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 12:58 AM.


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