interpolate hpr

Hi,

I receive datas from network concerning the new hpr to reach.
But I wish to smoothly rotate to the new hpr.

I affect the new hpr to an invisible node.

If I got the problem, you could apply a LerpHprInterval from the old value to the new value.

Ok. I know that my model is updated each 1/4second, so I can do something like :
LerpHprInterval (myNode,newHpr,1/4)

I’ll do it once, when I receive new coordinate, not each frame. Isn’t it?

Ok, I test, and it runs great.

Thank you

if self.lerpHpr!=None:
    self.lerpHpr.finish()
self.lerpHpr=LerpHprInterval (self.node,C_SENDTICKS,self.pointerToGo.getHpr())
self.lerpHpr.start()

I found LerpHprIntervals to be a pain in the long run since once they’re started they seem to run even if you try to stop them. At least, I caught hell trying to and the LerpHprIntervals just hurt my code.

The Alternative… I just wrote my own Python code to manipulate the HPR and multiplied “times” the globalClock.getDt().

That worked perfectly and allow me to have absolute control.

Right now at my current state of development, I’m finding pixel fill-rate to be a bigger issue, but that’s all apart of how you design. I’m handling it fairly well right now. Frame Rate 60. 8)