looking in the direction of travel using an interval[SOVLED]

hi, Im using an interval to move a model and well its not looking the direction that it is traveling.

self.moveInterval=LerpPosInterval(self.player, t, self.moveToNode.getPos(), self.player.getPos())

how do I make it look in the correct direction?

Have you tried something like:

set.player.lookAt(self.moveToNode)

?

David

oh wow…-____- how did i miss that

Thanks for helping me

however…the model is looking 180deg in the wrong direction now…

EDIT

sorry, forgot to mention that I “fixed” it. I just added 180 to the H of the player

self.player.lookAt(self.moveToNode)
        self.player.setH(self.player.getH()+180)

I just want to know if there is another way to do it other then that

It’s a common problem that happens because modelers like to look their models in the face when they create them. That means that the models are created looking down the backward axis (since forward is into the screen).

Your solution is simple and workable. Another possibility is to use an intervening node with a 180-degree rotation, or to apply an initial rotation with a flattenStrong(), or to pre-apply the rotation into the egg file with egg-trans or egg-optchar (depending on whether it is static or animated).

David

ok, thanks for the information