Astar's Rich AI collider is put on top the character's head

Cheo

Active member
Hello, here's a problem directly observable in the demo scene for the Astar integration :


Capture d’écran (430).png

The collider from RichAI gets displaced to the top of the character during the two first frames. It happens on this Atlas character and another one of my own characters, but not on others. It actually doesn't prevent Atlas from moving to his destination, however the distance between the collider and the destination prevents Astar from considering the job done - more precisely Reached End of Path is set to true when Atlas is on the target point, but Reached Destination is not, which is a big issue as it's the one we're supposed to rely upon !
I haven't managed to determine the cause of this issue yet. If anyone knows how to prevent this please let me know !
 
I didn't notice that before. If you don't figure it out I'd ask the A* developer about this, I'm not sure about the cause. If you can followup here that would be great so I have an understanding as well.
 
Just made a thread on the Astar forum : https://forum.arongranberg.com/t/astars-rich-ai-collider-is-put-on-top-of-ucc3-characters-head/13795

Pasting what I wrote : One thing is just discovered is that the Astar collider doesn’t get displaced automatically but instead when the character gets the order to move. So in the demo scene the collider is immediately displaced because the ability start type is set to automatic and a script assigns a destination. When setting the ability start type to manual the collider will stay where it is supposed to be until the character is given a destination and an order to start.
 
Welp, the Astar dev just told me you were the ones who wrote the integration and he doesn't know much about UCC, so I'm asking you again ! Maybe you can get in touch with him if needs be ? This integration is really important and deserves a fix, I'll take another look at it later and tell you if I find something else.
 
The integration just sets the destination on the A* agent. A good question would be to find out how that gizmo is positioned. The character controller doesn't have any control over that gizmo and it's something that is set on the RichAI component. I'm confident that this is completely on the A* side of things and doesn't deal with the character controller.
 
Yes, I now agree with you that this must rather be on Astar's side, and more specifically the way it locates the character's feet. Pasting what I wrote there : Looking at Astar's code, the only thing I found out so far is that the yellow collider is supposed to be based on the character's feet as evidenced by the GetFeetPosition vector 3 - I do not understand however when and how its "position" returned value is modified.
 
I just realized what the issue was all along : the ragdoll colliders. When only the main capsule collider is left there is no issue, the character moves to the destination with the Astar collider sticking to him. So do you have any idea how to handle these ragdoll colliders while using Astar ?

Edit : Just need to use layers - in UCC’s case, leave the SubCharacter layer checked on the Pathfinder’s layer mask but uncheck it on RichAi’s Raycast Ground Mask. Once that is done everything seems to work perfectly ! Could you make this small change in the integration demo scene and maybe add a note about this ?
 
Last edited:
Top