Problem sliding back down a slope
irvaz
Member, PRO Posts: 5
Hi, can anybody suggest a solution for my problem. I have been able to make my player walk up a slope by constraining the x velocity and rotation, but when the left/right keys are up the player slides back down very slowly. I checked and the x velocity is 0 but there is a slight y velocity of -2.2. I assume this is my gravity acceleration forcing the player back down. I've tried playing about with friction and drag etc but nothing seems to work. Any advice would be much appreciated.
Comments
what do you want to happen? You want to slide down quickly?
You tried setting friction drag to 0?
So when actor is on a slope and no keys pressed you don't want it to slide down?
Rule when touch overlap ramp actor and player velocity y < 0 then
Constrain player velocity to 0.
Sorry 2 am here and can't test that on my brain or computer.
@gattoman thanks for the reply
I want my player to not slide back down a slope when no keys are pressed
i tried what you said and i can see that x and y velocity are both 0 but the player is still sliding very slowly back down. I've been on this for days, im stumped
I would still try rule if velocity y=< 0
Constrain player velocity y to 0
Also
If velocity X <= 0
Constrain player X velocity to 0
If it's a ramp the player is moveing backwards and falling. ( I'm guessing
How are you "seeing" velocity?
Display function?
Maybe your actor is rotating?
Constrain rotation as well.
Just guesses. Without seeing it.
Figure it out?