Jump to content
The Dark Mod Forums

Is the collision model included in pathfinding?


Destined

Recommended Posts

Hi guys,

 

I have wondered, how the AAS decides, if paths are available for AI. Does it take the collision model into account or does it just calculate the width and height of passages and depending on that decides if the average AI should fit / not fit through that passage? Or to put it differently: does the collision model of an AI influence the path finding algorithm, i.e. will the AAS notice that a bigger non standard collision model is too broad for a regular passage or the other way around, that a smaller collision model would enable the AI to walk thrugh a smaller gap?

Link to comment
Share on other sites

Simply put, each AI has an AAS size that's used to construct a world for him to walk around in. In the case of the human AIs, that size is 32x32.

 

Dmap constructs a map of AAS areas whose edges allow the AI to walk to w/in 16 units of walls (world/monsterclip/etc. brushes).

 

Non-symmetrical AI (i.e. the horse) still have a square AAS size. So if a horse walks close to a wall, then does a 180 degree turn, his head or butt will swing into the wall.

 

The collision model (or bounding box) of the AI really only comes into play when the AI encounters func_statics or moveables or projectiles or other AI or the player.

Link to comment
Share on other sites

Addressing the 'height' part of your question ...

 

Dmap won't create AAS areas for an AI in passages that aren't high enough for him to fit through.

 

Humans are taller than rats, and each has a different AAS size.

 

If you want your rats to be able to run beneath tables, but you don't want your humans to bump into them, you can surround the table with monsterclip, then lift the bottom of the brush off the floor so there's room for rats to run underneath.

 

I also recommend that when you create a monsterclip brush around a func_static that you normally wouldn't want an AI to climb up on (like a table), that you lift the top of that brush up to the ceiling. Otherwise, dmap creates AAS areas on top of the brush and pathfinding's job at runtime takes that much longer when it has to deal with more AAS areas than you need.

Link to comment
Share on other sites

Ok, I see. Thanks! Then another question: would it be possible to change the AAS size of an AI (or where can I see, where it is defined)? My plan would be to give the AI a smaller AAS size, so the AAS thinks, that the AI would fit into a small passage. This I could then use to let my ghosts walk through walls, by creating a small gap on the bottom of a wall (that I could seal with nonsolid brushes to hide the fact, that there is a gap). If this works, only the ghosts could walk through the gap, but the player and other AI could not. It's not the most elegant solution to the problem, but it would work...

Link to comment
Share on other sites

Thanks a lot! The aas_rat worked. I used a gap at the bottom of a wall, that I filled with a nonsolid wall, so the player can't see it. That way it looks as if the AI walks through the wall while other AI can't. Of course, in this setup rats would also be able to walk through the fake wall, so I might just use a custom "use_aas" for the ghost. I wanted to make it as small as possible, so the player does not "feel" any resistence while walking through them. But now I can finally make only the ghosts walk through :)

Edited by Destined
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 4 replies
×
×
  • Create New...