WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-10-2011, 11:23 AM
kovitch kovitch is offline
Member
 
Join Date: Sep 2010
Posts: 30
Camera Position And Viztask

Hi,

I have a simple script that makes the camera move forward in my scene. The camera moves through some balls. Now I want to accomplish a task every time the camera's position surpasses the ball's.

I use the following lines to move the camera:

Code:
class AmblioCameraHandler( viz.CameraHandler ):
	def _camUpdate( self, e ):
		e.view.move( 0, 0, speed)

Nextly, I need to get the cameras position by doing:

Code:
cam_pos = viz.MainView.getPosition()
And then I need to compare it with the ball's z coord.

How can I do that using this viztask method?

Best regards!
Reply With Quote
  #2  
Old 01-10-2011, 06:36 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can create you own custom condition that checks the position of the viewpoint in relation to the balls. The following page has a section on writing a viztask condition:
http://www.worldviz.com/vizhelp/VizTask_basics.htm
Reply With Quote
  #3  
Old 01-11-2011, 07:36 AM
kovitch kovitch is offline
Member
 
Join Date: Sep 2010
Posts: 30
That did the trick. Thanks!
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
.clone() or .copy() durf Vizard 8 04-01-2009 09:45 PM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 01:14 PM


All times are GMT -7. The time now is 12:11 AM.


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