[SOLVED] How to create Arcing movement with forces

I would like to adjust my enemy movement towards my player by adding (in some cases) “drift like” motion away to the left or right of the hero then back inward to the characters position to simulate the enemy “trying to gain an angle”\ “avoid line of fire” while closing it’s distance with the player, I already know that I have get the enemy’s left\right and combine forces in the chosen left/right directions with the player direction at the given time, what I am unsure about is the approach to the adding and dissipating of the forces relative to the player position\s to achieve the arcing movement

Any help would be appreciated

Sum of forces = mass times acceleration

In the diagram you drew, the acceleration is to our right, so the force must also be directed that way.

To calculate the acceleration magnitude, some knowledge of calculus might be helpful, but if you limit yourself to constant accelerations, you can solve the equations of motion using algebra:

displacement = 0.5 * acceleration * (elapsed time)^2

1 Like

Thanks I think I understand what I have to do

1 Like