Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sliding down slopes while also allowing movement upward #75

Open
jamesarndt82 opened this issue Apr 29, 2019 · 2 comments
Open

Sliding down slopes while also allowing movement upward #75

jamesarndt82 opened this issue Apr 29, 2019 · 2 comments

Comments

@jamesarndt82
Copy link

I've re-purposed this system for a skateboarding game and it's working well. One sticking point I'm trying to figure out is how to get the player to slide back down to the bottom as if gravity were at play, but also allow the player to move up the slope. Right now it does this when I set a low angle not allowing player to move up (slides down nicely)...but again the player cannot move up slopes. I've been digging through the code for a couple of hours looking for what I need to comment out to no avail. Can anyone point me in the right direction?

@cjddmut
Copy link
Owner

cjddmut commented Apr 29, 2019 via email

@jamesarndt82
Copy link
Author

jamesarndt82 commented Apr 29, 2019

Thank you I will look into this section of code. I appreciate your guidance on where to look. I am able to slide up the slopes really well. It's that once I stop on a slope, the player doesn't slide back down. It sits in one spot. However I've noticed that if I set the allowable degree angle to be very low, in essence telling the script I am not able to go up this slope (it's too steep), the character will slide back down it very nicely if I jump onto the slope. So what I am trying to do is set that allowable slope angle to be high (up to 80 degrees or so) and this allows my player to roll up the slope, but I'd still like to have my player slide back down when I'm not pushing input to go up the slope. Basically like a faux gravity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants