![]() |
|
#1
|
|||
|
|||
|
Rotating an object around a point
Hi all, I'm trying to add a series of animations to objects that cause it orbit another, similar to the vizact.spin() function. Is there an easy way to do this? If not could you please help me come up with the code to do so?
Many thanks. |
|
#2
|
|||
|
|||
|
You can create a parent/child hierarchy and then spin the parent:
Code:
import viz
import vizact
viz.go()
viz.addChild('dojo.osgb')
group = viz.addGroup(pos=[0,2,5])
ball = viz.addChild('beachball.osgb',pos=[2,0,0])
ball.setParent(group)
spin = vizact.spin(0,1,0,45)
group.runAction(spin)
|
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| animate an object using 5dt data glove 5 ultra | agrima | Vizard | 3 | 07-01-2014 12:17 PM |
| Find collision point of line and arbitrary object | asdf | Vizard | 2 | 01-28-2013 11:04 AM |
| retrieve Object names | Geoffrey | Vizard | 11 | 12-11-2009 05:26 AM |
| rotating an object | Penguin | Vizard | 10 | 05-18-2009 06:24 PM |
| Object rotating around world axis, not own axis | tacbob | Vizard | 1 | 02-15-2007 10:12 AM |