I’m currently using posInterval and hprInterval to rotate and move my actor accordingly. The problem with this is what happens when you turn while the actor is already moving - while the actor is moving on a posInterval it will rotate, but the rotation made has no effect on the position the actor will move in, effectively making the actor seem as if he is sliding when he turns.
Disabling turning while the character is moving looks and feels very horrible, so that’s a no go.
This could probably be remedied by making the posIntervals a very short length and with a very short duration. Just wondering about performance issues - is this the right way to tackle this problem?
The problem with intervals is that they’re designed to do something over a period of time, which can make it tricky to change them dynamically (it can be done, its just not so worthwhile in this case).
You would probably want to have a task that applies a force to your character. Ie
from direct.directbase import DirectStart
from pandac.PandaModules import *
from direct.task import Task
#get forward vector
#also find the time since last frame
#push the object in whatever direction its looking (getH)
#point it forward relative to the panda
#allow the character to turn