1 decade ago by suffrage
Hey everyone,
I've been working on just putting together the initial elements for a game and I'm having trouble with dealing with slopes and my player entity. So my goal is this: if the player walks onto a slope within the slopeStanding range, walking up will be slowed, if the player stops on the slope they will not move (no sliding), and going downhill would increase the movement speed. I was just wondering if people had any examples of this. I've tried piecing things together that I've seen on the forums but nothing seems to really work. Mostly the difficulty is with the standing part: I'm not sure if it's best to increase the friction, set the velocity, set the position to the last position, etc. Then there are issues with dealing with jumping onto a surface, but I think just having a place to start would be incredibly helpful. Thanks for any help you can give
I've been working on just putting together the initial elements for a game and I'm having trouble with dealing with slopes and my player entity. So my goal is this: if the player walks onto a slope within the slopeStanding range, walking up will be slowed, if the player stops on the slope they will not move (no sliding), and going downhill would increase the movement speed. I was just wondering if people had any examples of this. I've tried piecing things together that I've seen on the forums but nothing seems to really work. Mostly the difficulty is with the standing part: I'm not sure if it's best to increase the friction, set the velocity, set the position to the last position, etc. Then there are issues with dealing with jumping onto a surface, but I think just having a place to start would be incredibly helpful. Thanks for any help you can give