njstaley
05-12-2010, 02:00 PM
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)
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)