RichAI Teleport within overridden OnTargetReached resets position after call

So I am working on an enemy that approaches an enemy until it reaches the target (5 units away from the target) and then is supposed to teleport to a different point and then continue approaching the enemy. However, it seems that after I call the Teleport method to reset the AI’s position, it is then immediately reset to the previous position. I have ensured that all the appropriate transform positions are being set when Teleport is called. It seems that somewhere the ClampToNavmesh method is being called and reverting the position back to the position prior to the teleport. Maybe this is because it is being called from withiin the OnTargetReached method? Might be a bug as this is definitely an edge case.

Hey,

Are you using some of the builtin scripts to move the enemy, if so which ones and what graf type?

It’s a very normal problem with teleporting :stuck_out_tongue:

I am using the Recast graph along with the RichAI script to move the enemy. I was calling the Teleport method from an overridden OnTargetReached method

Hi

In the current release it is possible that the Teleport method does not always work correctly for the RichAI script.
It should work in the current beta however (I even have unit tests for that now).
Let me know if it still doesn’t work.