WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 03-29-2006, 12:03 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

You have a couple options. You can use the view.goto function to animate the viewpoint moving to certains predetermined locations. Take a look at the animateview.py example in the [Vizard25]/examples/advanced directory.

You can also create an animation path. Take a look at the animatepath.py script in the same directory. Instead of linking the animation path to the ball, you can link it to the viewpoint.

If you have version 2.53 you can use the vizcam module to create a camera that orbits around a specified location. Here is a sample script using the vizcam module that creates 4 waypoints and cycles through them.
Code:
import viz
viz.go()

viz.add('tut_ground.wrl')
logo = viz.add('logo.wrl')
logo.translate(0,1,0)
viz.clearcolor(viz.SKYBLUE)

import vizcam
cam = vizcam.PivotAnimate()
cam.setPivot(0,1,0)
cam.setAutoMode(0)

CAM_SPEED = 2

locations = [ [0,1,-5] , [3,0.5,0] , [0,1.5,4], [-2,0.1,0] ]

cam.curLocation = 0
cam.gotoPosition(locations[0],CAM_SPEED)

def endcam(e):
	cam.curLocation = (cam.curLocation+1) % len(locations)
	cam.gotoPosition(locations[cam.curLocation],CAM_SPEED)
viz.callback(vizcam.END_PIVOTCAM_EVENT,endcam)
Let me know if you need more information on any of these methods.
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:18 AM.


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