Move With Object Ability Causes Weird Rotation Bug with AI Character

KO_Games

Member
Hi,

I'm trying to use the move with object ability with an AI character, but when the ability starts for the AI character the characters rotates and shakes a bit weird before settling down in a certain position. After which the AI character can then move just fine with the platform. To reproduce the issue I can drag a new character model in the scene. Use the character manager to create a new character. Check only the AI Agent box (I'm not using navmesh, but A* instead). Build character. Then under ability add the move with object ability. I created a prefab of the simple platform from the demo scene and added it to this scene and disabled the trigger collider on the platform since it is not needed for testing. Then I created a simple script that gets a reference to the character and the MoveWithObject ability. Inside that script I created a public method that when called will set the gravity magnitude to zero on the AI character and then set the target on the move with object ability to the moving platform. When I press play and call that method. The AI character wiggles and rotates weirdly...and then finally settles into place...at which point it then will follow the platform as intended. I'm not sure why this is occurring for AI characters and not the player character.
 
The Move With Object ability is likely conflicting with the pathfinding ability. I'll add it to my list of things to look at.
 
I tried this with a fresh scene/AI character, only the MoveWithObject ability assigned, and assigned an empty game object (with disabled KinematicObject component) as target to the ability. When I manually move the target object, the character moves without issue. I also tried this with the dolly track/ dolly cart of Cinemachine, and this also works perfectly fine.
I then added the NavMesh movement ability, baked the NavMesh, and it still works the same way. Both abilities are active when a target is assigned on the MoveWithObject ability, but not interference. I can move the character manually, or through the dolly cart.
 
Top