What you might want to do is to update the positions/velocities of your YUKA vehicles before you call
entityManager.update()
then you update the velocities on your physics bodies with the values from the YUKA vehicles and after these two steps you make aphysicsEngine.step()
call. I suggest you to not to use the BabylonJS physics impostors but use the physics engine directly so you can fully control it. This is just theory at the moment and I didn’t try it out, but should work.
I just saw this post. The date you posted this is roughly the same date I was hesitating if it makes sense to use ammo.js for collision detection and use YUKA for steering.
I used similar approach and it worked quite well. The physics engine simulate the world and the time ticks forward. The position info is sync back to YUKA world at every frame. YUKA computes the velocities for next tick and sends the new velocities to the physics engine. I also implemented flowfield path finding as a Steering Behavior in YUKA so it can be seamlessly combined with other build-in steering behaviors in YUKA: My first babylon.js hobby project - work in progress - #3 by slin