T
Tempus
Guest
Hi
Try to make my enemy movement as fluent as possible.
The enemies are driven by mp_potential functions and follow the player. This works pretty well.
I have 4 directions for the movement animations (up, down, left, right).
At the moment I get the direction which the enemy is pointing to change the animation.
My problem with the mp_potential functions is that sometimes the enemies are rotating at one place to find their way. The rotating is really fast, so they are just flickering.
How can I stop this?
(I have a vague idea of changing the animation based on how many steps (pixels) in one direction the enemy has made. So if the enemy is rotating but not moving a number of pixels (for example 2 pixels) he doesn´t change the animation. Sadly I have no idea how to code this.)
Try to make my enemy movement as fluent as possible.
The enemies are driven by mp_potential functions and follow the player. This works pretty well.
I have 4 directions for the movement animations (up, down, left, right).
At the moment I get the direction which the enemy is pointing to change the animation.
My problem with the mp_potential functions is that sometimes the enemies are rotating at one place to find their way. The rotating is really fast, so they are just flickering.
How can I stop this?
(I have a vague idea of changing the animation based on how many steps (pixels) in one direction the enemy has made. So if the enemy is rotating but not moving a number of pixels (for example 2 pixels) he doesn´t change the animation. Sadly I have no idea how to code this.)