How to handle slopes on a Character Controller in Unity easily. Prevents bouncing on shallow slopes and smoothly slides down steep ones. Quick, easy, and simple.
The first 10 seconds of this video were so helpful and fixed my problem. I couldn't find this answer presented so quickly and clearly anywhere else. I let out a big belly laugh at how easy it was. Thank you so much!
@hero3d899
3 жыл бұрын
glad I could help !
@ahoksure
2 жыл бұрын
Everyone on the unity forms was offering like the most complex trigonometric functions to fix slope bumping and you’re like “just set the value equal to a negative value.” Thank you for that.
@lamp9359
2 жыл бұрын
Immediately subbed. That was the best possible way to answer this. Thank you for existing
@DustyTrailsDev
2 жыл бұрын
My man you are a legend, informative, concise and funny
@scrub2657
3 жыл бұрын
ok cool, but how do I make minecraft? This isn't in the tutorial for some reason
@bircheth
2 жыл бұрын
hey man thanks, i really appreciate just getting right to it with the info. the last video i searched up on how to get rid of the bumpiness was 36 minutes long lmao
@nevi5158
2 жыл бұрын
goddam finally a video where I can fix my problem in 1 minutes and not in 45
@theanimatronicgamerreturn7785
3 жыл бұрын
YESSSSSSSS YOU ARE BACK
@miloverreijt6396
3 жыл бұрын
Great video! Quick and simple.
@gmathews9
3 жыл бұрын
Most underrated KZitemr in the world
@SonictheHedgehogInRealLife
2 жыл бұрын
moveDirection.y = -antibump if on ground but if were not on ground what do we do? when i apply gravity the -antibump value is still applied to moveDirection.y how do i clear it? or set it back to 0 without it staying zero and applying the gravity? when i set it back to zero the gravity just doesnt work
@PauloCazaresBelman
2 жыл бұрын
looks like we meet again pal lmao
@SonictheHedgehogInRealLife
2 жыл бұрын
@@PauloCazaresBelman these tutorials suck
@Fuzzietomato1
2 жыл бұрын
Steep slope solution worked well, there seemed to be a limit on the slide speed for some reason though, once I increased it to a certain point it wouldn't slide any faster.
@maddened3746
2 жыл бұрын
BEST !!! within first few seconds my issue was solved lmao ... best shit ever
@Ciac18
8 ай бұрын
I have a question my character moves down even on slops that have a smaller rotation than the slope limit can you help me?
@Tarodev
Жыл бұрын
Sweaty gamer feet caught me off guard
@zbarba
3 жыл бұрын
Damn this is golden
@neonsloth
2 жыл бұрын
This is very similar to what I am doing... But for some reason the character controller.isGrounded spams true and false...
@itzdrify5678
2 жыл бұрын
error the name "DefaultMovement" does not exist in the current context
@goosepicklebumps5005
2 жыл бұрын
are there numbers that i need to add to the code or just copy it? (sorry im new)
@Wevli
3 жыл бұрын
I've tried this and the character slides down slopes perfectly but at the bottom of certain slopes the character jitters up and down between steep slope angles and not each frame. Also only when they're facing the corner, never when facing towards. I'm using the unity terrain so I'm bound to have a bunch of these intersections. Any ideas on how to smooth out the controller or stop it triggering when in that situation?
@buzzyrobo
2 жыл бұрын
Worked nicely, only problem was the slide speed was way too high, at 0:40 just had to change + Time.deltaTime to * Time.deltaTime
@AquariaAiryglyphia
3 жыл бұрын
@Hero 3D : Can you please upload a github example showing how to use a Rigidbody to slide down steep slopes based on an angle?
@AquariaAiryglyphia
2 жыл бұрын
Hello?....
@L1ghtOn3
2 жыл бұрын
More videos please, very well done, not too much faff, maybe a little bit of a demo for step by step old slowbies like myself, nice vid though, thumbs up for sweaty feet!
@Carteeeer52
2 жыл бұрын
Hey I got a problem where after sliding it stays stuck in the slide movement even on flat surfaces any idea how 2 fix?
@hungryplant5341
Жыл бұрын
Probebly a bit to late, but if the reason for your problem was the same as in my case, you need to make shure the vector is set to zero again after yout touch the surface
@daveejons
3 жыл бұрын
You are THE gamer
@iR3dy
3 жыл бұрын
what if you're not using the character controller? what do i replace that with?
@hero3d899
3 жыл бұрын
I would imagine on a rigid body it will be a more physics based solution.. but I couldnt tell you forsure because im ride or die character controller gang
@stigmistergaming3561
3 жыл бұрын
@@hero3d899 I was a rigidbody stan, but after watching this video, fuck that shit. Character controllers all the way!
@hero3d899
3 жыл бұрын
@@stigmistergaming3561 I’m so happy you have now seen the light
@kalpolproductions8558
2 жыл бұрын
Error CS0161 'PlayerMovement.OnSteepSlope()': not all code paths WHY?
@stylie473joker5
2 жыл бұрын
the bool method requires a return true or false
@siavashaliyari8567
2 жыл бұрын
thank you so much
@munyunu
2 жыл бұрын
instant subbed
@kamolzaaliite
3 жыл бұрын
Really needed recoil patterns, but did it myself
@hero3d899
3 жыл бұрын
sorry ): but good job
@Mr.Epsilion
3 жыл бұрын
Thank yo.. really helped
@TETE
3 жыл бұрын
did u have this error? the type or namespace name 'MoveSettings' could not be found
@@TETE I checked the code, it works fine, maybe you are using a namespace, try adding your code to your namespace. For example I have, with my namespace: namespace AW { // Put your code here public class FPC : MonoBehaviour { . . . } } To find out what namespace you wrote, define it in the unity edit > ProjectSettintg > Editor > Root Name Space
@darkstar8693
2 жыл бұрын
can you upload source code please?
@forcepower7116
3 жыл бұрын
Wowwww hold on
@Rafaelcraftero
3 жыл бұрын
bugs on +80º slopes
@neonlemurs4865
2 жыл бұрын
This is true, I would like to see a solution to this
@u.s7072
2 жыл бұрын
increase ground ray distance
@ConchStreetStories
3 жыл бұрын
How can you put ads on your channel without having 1k followers ahaha,, but anyway nice video
@hero3d899
3 жыл бұрын
I think its just YT if you dont pay for premium. I havent dont anything with ads and receive $0.00 from these videos :P
@Yujoon-ls8nk
8 ай бұрын
For me, it worked better when it was float _slopeAngle = Vector3.Angle(_slopeHit.normal, Vector3.down); and not float _slopeAngle = Vector3.Angle(_slopeHit.normal, Vector3.up); For me it prevents sliding after getting away from the slope.
Пікірлер: 58