News Forums RAIN General Discussion and Troubleshooting Questions about RAIN

This topic contains 2 replies, has 2 voices, and was last updated by  basil4j 1 month, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38113

    basil4j
    Participant

    Hi All,

    Im currently developing a game which uses Unity terrain, and have been using Unitys built in NavMesh.
    The problem in having, is the NavAgents cut through terrain (Y direction only) when moving and the only way to prevent this is very hacky…I have a few solutions but none are ideal.

    Im not a fan of hacky things so am wondering if RAIN has these issues or if AI’s move over terrain quite happily? i.e. do they follow its contours?

    Also, a side questions. In combat, movement switches from free to tile based. Is there a built in feature to search the NavMesh as a grid? or someway to get info about the walkability of the terrain under world coord x/z which i can use to build my own?

    Thanks!

    #38131

    prime
    Keymaster

    RAIN AI movement is based on the AI Motors, not directly on the Navigation system. The AI will follow the terrain properly in most cases, assuming you are set up correctly with a CharacterController or similar.

    There is no built in feature to search the NavMesh as a grid, but you can easily test walkability of terrain at a coordinate. This is a method call on the graph called Quantize, which returns -1 if the terrain is not walkable. You can then separately search for a path to the location to make sure it isn’t an island, unreachable for your starting point.

    • This reply was modified 1 month, 2 weeks ago by  prime.
    #38140

    basil4j
    Participant

    Perfect thanks :) in tossing up between this and A* project, which is grid based.
    That’s a point to A* but I do like the waypoint and other AI features available in RAIN. I’ll have a part around at creating a grid and see if it works for me.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.