【Help】About Penalty

I have 2 questions:

  1. I can’t find any documentation related to position penalty/angle penalty?

  2. I have a 2d project (isometric, which simulates real world movement) and I want my character to move at normal speed on the X axis and half the speed on the Y axis, when the direction vector is between the X and Y axes , his movement speed is between normal speed and half speed, can this be achieved with position penalty/angle penalty?


If you use an isometric grid graph then the costs will be as if this was a normal grid graph. Like the isometric projection was just a camera projection and it does not matter for grid graph costs.

The agents themselves, however, always move with the same speed and do not take into account that isometric projection. You could get this to work by following these directions: IAstarAI - A* Pathfinding Project and modify nextPosition so that the agent moves less in the y direction.

The angle penalty is not related to what you want to do, but here’s some documentation for it: RuleAnglePenalty - A* Pathfinding Project

@ aron_granberg Thank you very much,you are so nice !
Your suggestion solved my problem :smiling_face_with_three_hearts:

1 Like

This also affects MultiTargetPath , there is no need to write additional methods to compare distances, it’s so cool! :smiling_face_with_three_hearts:

1 Like