AI traversing slopes

Archive of the old editing forum
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.
Locked
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

AI traversing slopes

Post by LilWhiteMouse »

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.
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: AI traversing slopes

Post by printz »

I couldn't make monsters traverse even slopes of 1 (45 degrees), so I had to make them less steep.
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Re: AI traversing slopes

Post by Phobus »

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).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: AI traversing slopes

Post by Graf Zahl »

Stepheight comes never into play with slopes. The only check is how steep they are. I think the cutoff is 45 degrees.
koverhbarc
Posts: 230
Joined: Mon Dec 06, 2010 6:26 am

Re: AI traversing slopes

Post by koverhbarc »

Does it not depend on the monster's speed? I know the player can climb greater slopes when running than when walking.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: AI traversing slopes

Post by Graf Zahl »

No, he can't. All that happens is that the remaining velocity can carry him a bit farther.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: AI traversing slopes

Post by LilWhiteMouse »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: AI traversing slopes

Post by Graf Zahl »

Then it gets messy. That code doesn't really work well.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: AI traversing slopes

Post by LilWhiteMouse »

So in other words, try it, see what it does, and go from there?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: AI traversing slopes

Post by Graf Zahl »

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.
Locked

Return to “Editing (Archive)”