Panda3D can automatically generate intervals for position to a certain point or a rotation to a certain Hpr value.
You can do this by calling the posInterval and hprInterval on the object.
myInterval1=myActor.posInterval(1.0,Point3(10,10,10)) #this lets the actor move to point 10,10,10
myInterval2=myActor.posInterval(2.0,Point3(8,-5,10)) #twice as fast
myInterval3=myActor.posInterval(1.0,Point3(2,-3,8),startPos=Point3(2,4,1)) #you can specify a starting position, too.
myInterval4=myActor.hprInterval(1.0,Vec3(180,90,0)) #rotate it
|
You can easily create Sequences and Parallels from these intervals:
mySequence=Sequence(myInterval2,myInterval4)
mySequence.start()
myParallel=Parallel(myInterval3,myInterval1)
myParallel.loop()
|
scaleInterval, posHprInterval, posScaleInterval, hprScaleInterval, and posHprScaleInterval work similar.
Note: The physics engine won't affect a Node that is moved using posInterval()!
|