Rotation of the pathfinding objects In correlation with animation rotation

the pathfinding does not like moving obstacles :frowning:
they will move in diagonals to avoid obsticales, even when disabled.

1 Like

All of the examples you have resent me of my project move diagonally and the cows can collide with each other.
In the video there where no cows colliding with each other, and they could not move can diagonally.
what you gave me is just like what i have seen here on the forums they have pathfinding issues and slide around and have no collision.

The animation simplification doesn’t seem to work because in your examples they walk in place

thank you for trying though

not true, if you open game2 they do not move diagonally, but they do overlap tho.
in order to have both its best to work with more objects.

do you mean this one? lol
image

i didn’t change anything i can send you a picture

weird, that never happend in my testruns. and by the looks it happend only once on the inicial run for 1 cow.

otherwise the animations do work.

no they will continue to collide with each other do you need a longer clip
no the animation don’t work look at the ones waking in place

i know, i told you that they collide.
i sad to you here and also via pm that in order to have that proper working, you will probably more objects.

Again my question from the beginning was “Was there a way to simplify the animations?” What you have given to me does not work.

My other question was, “Is there a way to do what I wanted to do with only 1 object?”. The answer to this could have simply been, no.

the “it works on my PC” is not a good solution.

maybe the animation doesn’t work because I saw you copied the solution on the form from another user. and maybe you don’t fully understand the math?

I haven’t had the chance to really look at the math solution but looks like it would work.

Everything worked in the video i just wanted to simplify things

I have shelved the project for now it will probably stay on gdevelop because the engine I was going to move it to “001 game creator” engine that humble bundle had on it the other month sucks in documentation and has a very poor interface.

I appreciate the valiant effort that you had put in to help me out and I thank you for it

this is simply not true. the cows do face in the right direction there are working, without the need for more objects.
so it is not a problem of animation, but rather a problem of the pathfinding behavior.
the easiest solution to that you mentioned to me already in your pm, that you move only 1 cow at a time.
maybe i will give it a shot later so fully solve that problem,because i find it interesting.

E: Tested it with 1 cow moving, and it works perfectly.

Hi, it might be a late reply and I don’t know if you found a way to do it. but, I found one thread on this forum that might help you, How can I do the Pathfinding correct animation?

Maybe, what happens is that a new path is asked when the object is between 2 cells.
Indeed, the 1st step is not to go to the nearest cell but to go to the next cell as if it were already on the nearest cell.
tank-grid

tank-path

To avoid overlapping, a solution could be to search for a new path (to the same target) each time a node is reached (and if necessary, put an obstacle on the next cell to reserve it)