WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   spin around axis object (https://forum.worldviz.com/showthread.php?t=1050)

kazo11 04-19-2007 03:03 AM

spin around axis object
 
I have 5 objects

D1,...D5

D1 spin around own z axis of 45
and D2....D5 have spin around D1 z axis

d1.spin (0,0,1,45,2)
d2.spin (0,0,1,45,?)
d3.spin (0,0,1,45,?)
d4.spin (0,0,1,45,?)
d5.spin (0,0,1,45,?)

kazo11 04-19-2007 03:46 AM

Quote:

Originally Posted by kazo11 (Post 3850)
I have 5 objects

D1,...D5

D1 spin around own z axis of 45
and D2....D5 have spin around D1 z axis

d1.spin (0,0,1,45,2)
d2.spin (0,0,1,45,?)
d3.spin (0,0,1,45,?)
d4.spin (0,0,1,45,?)
d5.spin (0,0,1,45,?)

Can you help me???

farshizzo 04-19-2007 09:48 AM

If you want the other objects to spin relative to D1, then you should add those objects as children of D1. For example:
Code:

d1 = viz.add('mymodel.osg')
d2 = viz.add('mymodel.osg',parent=d1)
.
.
d5 = viz.add('mymodel.osg',parent=d1)


d1.spin(0,1,0,45)

#These objects will spin around d1 z-axis
d2.spin(0,0,1,45)
.
.
d5.spin(0,0,1,45)



All times are GMT -7. The time now is 10:42 PM.

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