WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-12-2010, 02:00 PM
njstaley njstaley is offline
Member
 
Join Date: May 2010
Posts: 3
vizact parallel behavior

I'm new to vizard, so please bear with me if I'm missing something obvious.

I have a scene whith two objects (ball and ball2), ball has its center set to a new location using the center function while ball2 does not. After this I want to rotate and move them at the same time with vizact.parallel. When I tried this, ball does not behave as I had expected.

I would expect to see ball orbiting its center location (rotate) while moving(move), and ball2 to be spinning about its center while moving. While ball2 spins as I expected, ball does not orbit like I thought it would. It instead seems to rotate about a different axis and never seems to complete a cycle. Does anyone know why this is happening, or how to work around it?

Thanks in advance for your responses.

ball = viz.add('ball.wrl')
ball.setPosition(0,3,0)
ball.center(1,2,1)

ball2 = viz.add('ball.wrl')
ball2.setPosition(0,1,0)
testAction = vizact.parallel(vizact.move(0,.05,0,20),vizact.spi n(0,1,0,36, 20))

ball.addAction(testAction)
ball2.addAction(testAction)
Reply With Quote
  #2  
Old 05-14-2010, 11:18 AM
njstaley njstaley is offline
Member
 
Join Date: May 2010
Posts: 3
Temporary Work Around

I can apparently get the action that i desire using the vizact.moveTo instead of vizact.move in the parallel action. Unfortunately this does not let me move about local axis by default, forcing me to calculate the desired end position along the local axis before starting the action. Is there a batter and more efficient way to do this?

Thanks
Reply With Quote
  #3  
Old 05-14-2010, 11:55 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
This is a bug with the center command. Instead, trying creating a hierarchical transform to rotate an object about an arbitrary point. You can do this by creating a group node and adding the ball as a child to it. Set the position of the child to whatever rotational offset you desire, then apply the move/spin actions to the group node.
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
parallel port method bionic1 Vizard 2 05-04-2009 06:41 PM
vizact Vinicius Lima Vizard 1 08-01-2007 02:10 PM
killing vizact timers cade_mccall Vizard 1 04-18-2007 09:20 AM
Parallel Threads Hodge1620 Vizard 1 04-24-2006 11:32 AM


All times are GMT -7. The time now is 01:15 AM.


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