Terrains - non-walkable areas (slopes)

Blitz3D Forums/Blitz3D Programming/Terrains - non-walkable areas (slopes)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The problem is you cannot tell Blitz the max slope angle that is allowed for walking, this would make things much easier.

Sure you could!

Create a pivot parented to you that is a little in front of you - or rather a little away from you in the direction you're trying to walk;

Use this to check the gradient (TerrainY of the pivot minus TerrainY of you)

If gradient > maximum, don't allow the player to move forward.

You can get more subtle - in my demo you slow down as you climb steeper gradients and run quicker downhill - you could add fatigue etc.