NPC Movement not working after upgrade

Zaddo

Active member
I just upgraded from 3.0.9 to 3.0.15. I am using A* Pathfinding with the Opsive integration.

The NPC movement has broken. The character jitters back and forth, slowly moving along the A* Path.

I have spent several hours debugging and I am lost. As far as I can tell, the desired movement is calculating correctly. CharacterLocomotion.ApplyPosition also appears to set m_Position correctly.

This is where I get stuck. Previously the Rigidbody got set in the ApplyPosition method. The movement is now controlled in the SimulationManager. I have not been able to unravel the logic within the SmoothedCharacter class.

I attempted a quick fix by calling SetPosition at the start of the Move/SmoothMove methods. But this stopped the character from moving completely. However, I did get one clue from this attempt. I have a debug marker at A*'s AIBase.GetFeetPosition. This marker started moving smoothly after making this change. Which I think demonstrates that the desired movement is being calculated correctly.

Q1. Is it possible to modify SimulationManger so that it works the way ApplyPosition used to work? At least, temporarily so I can confirm the issue is within SimulationManager.

Q2. Any other hints on why this might be broken?

PS: This might just be a me thing. But I found having all the SimulationManager sub-classes in the one file, difficult to follow the code. I would have found this easier to follow if they were split into partial classes. I think this is because, typically you have one class per file. So as I was skimming through the code trying to work out what was going on, I initially didn't realise this file contained several classes.
 
Last edited:
To get started, does the A* demo scene work correctly in a fresh project for you? The Simulation Manager was updated a lot between those releases and maybe you have some custom code that is preventing the move?
 
Thanks. I was digging myself into a hole, I needed that prod to get me unstuck. I had a custom ability for the A* agent movement, that was vanilla with some extra features. But vanilla has changed with this update.

Apologies for wasting your time.
 
Top