![]() |
#1
|
|||
|
|||
Spin Actions and rotations
Hello,
Would it be possible to post here a sampel script where objects spin away from the origin? I've tried many times to make it work and it appears that the software only understands the origin at (0,0,0). Thanks, Vinicius |
#2
|
|||
|
|||
Here is a sample script that spins a ball around a center. There are many ways to do this, this example simply sets the center of the ball away from the origin.
Code:
import viz viz.go() RADIUS = 2 CENTER = [0,0,0] ball = viz.add('ball.wrl') ball.center(-RADIUS,0,0) ball.translate(CENTER[0]+RADIUS,CENTER[1],CENTER[2]) ball.addAction(vizact.spin(0,1,0,90)) viz.add('tut_ground.wrl') viz.MainView.move(0,0,-10) |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|