Closed SetLinux closed 4 years ago
You’re absolutely right! I’m actually going to be using this demo for Handmade Seattle. It’s a convention for low level “hand crafted” software. My plans are to add in explicit code paths for dashing, slopes, standing on crates, and one way platforms. I’ll be presenting next month.
In the case of slopes my preferred strategy would be to detect when the player is on a slope, disable gravity, and use specific code to move the player up and down the slope. This way any custom behavior can be achieved. My plans are to let the player intersect the slope so the players center along the x axis is visually standing on the tiles.
Does that make sense?
thanks for the fast response , actually this is perfect , i did something similar to the x axis penetration in unity and it worked great (used the shape cast stuff from rigid body iirc) but i think this still suffers from one problem that is sloped roofs you still would get pushed out with the normal of the sloped roof
for example here : this isn't sliding i am applying just an upwards velocity
any advice you can give ?
When on slopes, disable gravity, and use an explicit code path to move along the slope. This is like a different state if the player is considered a state machine. Then, when they jump or otherwise leave the slope, enter back into the normal walking state.
Just closing this out. Feel free to comment here or reopen it if you like :)
due to the way NGS works when on a slope and continuously jumping for example after a bit of time you can realize there is some movement in the X axis because you are everytime pushing the player by a small amount in the normal of the collision and that would add up causing movement in some extreme cases