AI traversing slopes

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

AI traversing slopes

Postby LilWhiteMouse » Sat Jan 15, 2011 5:18 pm

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 16 Jul 2003
Location: Maine, US

Re: AI traversing slopes

Postby printz » Sun Jan 16, 2011 4:19 am

I couldn't make monsters traverse even slopes of 1 (45 degrees), so I had to make them less steep.
User avatar
printz
Eternity and AutoDoom programmer
 
Joined: 26 Oct 2006
Location: Bucharest, Romania
Github ID: ioan-chera
Operating System: Windows 10/8.1/8/201x 64-bit

Re: AI traversing slopes

Postby Phobus » Sun Jan 16, 2011 5:17 am

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
Phobus
Registered Occasional Lurker
 
Joined: 05 May 2005
Location: London

Re: AI traversing slopes

Postby Graf Zahl » Sun Jan 16, 2011 5:33 am

Stepheight comes never into play with slopes. The only check is how steep they are. I think the cutoff is 45 degrees.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: AI traversing slopes

Postby koverhbarc » Sun Jan 16, 2011 7:23 am

Does it not depend on the monster's speed? I know the player can climb greater slopes when running than when walking.
koverhbarc
Banned User
 
Joined: 06 Dec 2010

Re: AI traversing slopes

Postby Graf Zahl » Sun Jan 16, 2011 8:11 am

No, he can't. All that happens is that the remaining velocity can carry him a bit farther.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: AI traversing slopes

Postby LilWhiteMouse » Sun Jan 16, 2011 10:06 am

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 16 Jul 2003
Location: Maine, US

Re: AI traversing slopes

Postby Graf Zahl » Sun Jan 16, 2011 10:27 am

Then it gets messy. That code doesn't really work well.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: AI traversing slopes

Postby LilWhiteMouse » Sun Jan 16, 2011 10:35 am

So in other words, try it, see what it does, and go from there?
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 16 Jul 2003
Location: Maine, US

Re: AI traversing slopes

Postby Graf Zahl » Sun Jan 16, 2011 10:38 am

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


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 1 guest