Ok as the title says: How to counter gravity from all sides but keep movement/jumping intact with 0.0 friction.
What?
Past week i made a simple blend to be able to walk on spheres/animated objects etc, etc.
I just rewrote the script, due to i didn’t like it, atm with the default friction (0.500) it works perfectly fine. But i need 0.0 friction else the player will not drop down if you jump and hit a wall and keep pressing the movement keys.
Don’t tell me to do velocity *.1 or something because velocity is already 0.0 at that point, it’s purely the gravity i’m fighting with. Does anyone know an ‘easy’ solution?
Atm. i use this to counter the gravity (with the default 0.500 player friction)
It’s the code to push the player against the object at all times
That’s why i said this: ‘Don’t tell me to do velocity *.1 or something because velocity is already 0.0 at that point, it’s purely the gravity i’m fighting with’.
I do not want friction at all, i wanna get rid of it. and keep my char in place, but still able to walk/jump on any side of the object(s)
Ok, I’m to tired, but fixed it.
I tried applyForce() before, i also use that to counter, but didn’t work because it kept pushing the player up into the air and without additional checks rays etc. it did not work., but i actually did not try it again with the new gravity code that i made (in first post), so i tried it again, seems to work well in combination with the above script, no additional lines of code needed.
Sorry for this stupid question, tiredness does that with you.
Yup that’s one way to do it, but not my way, collision itself stops the player.
I finished the code and i’m happy with the results now, i will update the topic in resources.
Funny part is, the script now has more comments then code haha.