While making a new fps engine one issue has stood out. sliding down slopes.
I know it sounds weird, but you know how fps games (or any first person one for that matter) allow you to go up slopes without any speed decrease up until a certain angle (like 40 degrees) and then after that a speed decrease and sliding will be applied until below that angle. This sounds reasonable, as you can also stop on said slopes without sliding down. This could be used both indoors and out.
Q: indoors? how so?
A: indoors as in stairs.
Q: but stairs are flat.
A: in games, stairs have clips to make them smooth.
Q: so stairs are slopes?
A: Yes. If you play CS 1.6 on any map (dust 2 for example) and slowly go up the stairs, you will jolt up each step. In CS:GO, everything is clipped so this doesn’t happen. A video by 3kliksphilip explains how the engine deals with stairs. (found here) it perfectly explains how source deals with stairs.
Ok. question time.
Is it possible to have a physics object go up a slope without consequence, only until 40 degrees, with only then having an effect, with stopping on the slope possible without sliding down? The max cutoff would be 45 degrees. If the imposter is on a 45 degree slope it cannot go up and will slide down until it reaches a 40 degree slope.
Is it possible to prevent a physics imposter from rotating past 45 degrees? Not much explanation here. If so, cool! if not, I’ll figure out something eventually.