AI traversing slopes
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- LilWhiteMouse
- Posts: 2270
- Joined: Tue Jul 15, 2003 7:00 pm
- Location: Maine, US
- Contact:
AI traversing slopes
How much of a slope can the AI traverse? I assume it's tied the actor's stepheight/dropoffheight/radius, but I can't seem to find a definitive answer in my experimentations.
Re: AI traversing slopes
I couldn't make monsters traverse even slopes of 1 (45 degrees), so I had to make them less steep.
Re: AI traversing slopes
Due to the way slopes aren't too precise when calculated, it's not quite as reliable as with AI climbing stairs, but as far as I'm aware it is tied in to stepheight/dropoffheight/radius. A 30 degree slope will probably admit Revenants and the like (haven't checked mind), but it'd have to be much shallower for a Mancubus.
Take into account the imprecision, and really you want to avoid making slopes that are exactly the maximum stepheight (24 units up for every 40 or so along should be ok for imps on stairs, but if the slope ends up being even one unit higher, it won't work).
Take into account the imprecision, and really you want to avoid making slopes that are exactly the maximum stepheight (24 units up for every 40 or so along should be ok for imps on stairs, but if the slope ends up being even one unit higher, it won't work).
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: AI traversing slopes
Stepheight comes never into play with slopes. The only check is how steep they are. I think the cutoff is 45 degrees.
-
- Posts: 230
- Joined: Mon Dec 06, 2010 6:26 am
Re: AI traversing slopes
Does it not depend on the monster's speed? I know the player can climb greater slopes when running than when walking.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: AI traversing slopes
No, he can't. All that happens is that the remaining velocity can carry him a bit farther.
- LilWhiteMouse
- Posts: 2270
- Joined: Tue Jul 15, 2003 7:00 pm
- Location: Maine, US
- Contact:
Re: AI traversing slopes
What about crossing from slope to slope? My AT-ATs can climb one slope, but when it reaches the edge of another, shallower incline, it can't cross over.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: AI traversing slopes
Then it gets messy. That code doesn't really work well.
- LilWhiteMouse
- Posts: 2270
- Joined: Tue Jul 15, 2003 7:00 pm
- Location: Maine, US
- Contact:
Re: AI traversing slopes
So in other words, try it, see what it does, and go from there?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: AI traversing slopes
Like that. If you walk over a slope boundary you'll notice some bump in the player's movement. That same effect is present for monsters and this does use the stepheight as a threshold. But since it's about slopes the true values are guesswork at best.