Support Forum

AI path overwriting Rigidbody

Hi, i recently added the scripts to my proyect and after fiddling a bit with the settings i’ve reached a problem i havent been able to solve.

The players attacks have a property with which they pushback a rigidbody in the enemy layer on hit. It looks like this.

After adding the pathfinding script, this does not longer work.
According to the console Unity is acknowledging the collider beign hit, but the pushback isnt working anymore.

Any ideas?

Edited for extra details.*

Hi

Yes, the built-in movement scripts do not move using forces at all. I’m afraid to use forces to move the rigidbody you will need to either write your own movement script (https://arongranberg.com/astar/docs/custom_movement_script.html) or customize the logic with which the AIPath moves itself (this can fortunately be done relatively easily, see https://arongranberg.com/astar/docs/iastarai.html#MovementUpdate)