Is possible to recreate the path of the demon like this video
(30) Warcraft 3 Reforged - Hungry Felhounds - YouTube
Here is my playground thanks!!
Follow demon | Babylon.js Playground
Here another test
Follow demon 2 | Babylon.js Playground
Hey @Abner_Corona.
My apologies. Iâm not quite sure I understand the request here. Could you help elaborate a little bit about what youâre trying to do?
Thanks!
demon.position = BABYLON.Vector3.Lerp(demon.position, target.position, smoothingSpeed)
Based on the youtube video that @Abner_Corona shared I believe what is desired is bit of âslip and slideâ and âover shootingâ ⌠a little âtokyo driftâ. Whereas in the playground the demon follows the target a little too well, itâs right on top of it and the movement is completely straight and linear.
Iâm not an expert at this but @Abner_Corona maybe try separating the rotation (lookAt) from the translation (follow) to have different âratesâ. To me, it seems that the illusion of this deer slipping on ice comes from turning toward the target immediately (continue to update lookAt on every frame), but not updating position to target on every frame, or rather, maintaining the direction where it was previously going as if it canât stop itself due to momentum.
Just an idea to try is using some setInterval that sets an animation on the demon to go where the target is, and just let it play out to move the demon from point A to point B over a number of frames with some easing function. On the next setInterval cancel the previous animation and create a new one, doing the same thing for the new target position and so on. That might make it seem like itâs so forceful in moving to a place that it canât stop itself.
https://playground.babylonjs.com/#6YFZFB#8 â Move to
https://playground.babylonjs.com/#6YFZFB#9 â Follow
https://playground.babylonjs.com/#6YFZFB#10 â Caravan
There are ways to smooth it out even more, with the lookAt having a targetPositiong being lerped as well so they turn smoother. You can also work in inertia systems into this as well to make it way more realistic with motion.
Thank you all I really appreciate it!!! if I finish my game I will give you the credits, honor to which honor deserves
Follow demon with a little slip and slide thanks | Babylon.js Playground (babylonjs.com)