0

So Panda3D has this option to update the starting position of a Lerp interval by using the parameter "bakeInStart", if we set it equal to 0. However, I can't find a solution to overcome this problem, which is updating the end HPR (yaw, pitch, roll) value each time there is a new iteration of the Lerp interval loop. I've managed to work around this to get the desired effect, but a whole screen of code had to be written (because of multiple intervals written in sequence). I've tried this so far to minimize code:

self.rotateTargets(0)

def rotateTargets(self, angle):

    # Create Lerp intervals for each target orbit node to rotate all of the targets
    # in a parallel sequence with easing
    self.angle = angle

    self.rotateTargets = Sequence(
        Parallel(
            LerpHprInterval(self.orbitNodes["orbit0"], 4, Point3(0, 0, self.angle+90), blendType = "easeInOut", bakeInStart = 0),
            name = "rotateTargets0"), Func(self.targetReparent(self.orbitNodes["orbit0"].getR())) 

self.rotateTargets.loop()

def targetReparent(self, newAngle):

    # Define new angle
    self.newAngle = newAngle
    self.angle = self.newAngle

An assertion error appears in the console, but it is related to the imported functions, and not my code.

Marco_O
  • 99
  • 1
  • 8
  • Could you update your question to include the exact assertion error (and context) that appears in the console? – rdb Jan 13 '14 at 23:32
  • Nevermind, this question was solved not by programming, but by designing what I had in mind differently. How do you delete your questions? – Marco_O Apr 14 '14 at 15:09

0 Answers0