Well nothing came to mind when I wrote that. I’ve already become unfamiliar with what my example did.
Well the idea is simple. Find if a ball shaped player is overlapping the wedge shape. If it is move out in the closest direction. And since gravity and the motion directions aren’t parallel with the slopes sliding occurs which is semi realistic.
There are likely many solutions. I mentioned the idea to push up maybe when on a slope, but it would require logic to not push up when moving from the sides.
Possibly we could guess when you want to push up by looking at the z component of the normal.
Another idea is to disable gravity when on the ground. Again you should be able to know that based on the z of the normal, or we could make the collision detection return what feature of the wedge we are pushing out of. Then when on the ground we could make the motion be parallel to the slope so no sliding would occur. It would require rotating the motion axis’ with the normal.
Third idea is a vertical ray cast to find the ground level and just change the z to that.
Anyways most of those would work best by scrapping my example and making a new one.