How do I make an object slide along an arbitrary slope?
I am trying to figure out how to get a pawn to slide along a slope. Right now, I am using a custom movement component that is currently based on UFloatingMovementComponent, and I am using that to make a custom gravitational field that is based on the surface normal.
At high velocities the object will actually launch it self off a slope and cause the gravity to pull it back down towards the surface thus causing that weird jumping motion you are seeing In the video.
My question is how do I go about and make this pawn slide smoothly along a surface? Think of how in Skiing games, a dip in the surface won't normally send the player flying off into the abyss unless it's steep enough.
asked Feb 19 '17 at 01:54 AM in C++ Programming
Hi, bit late but for anyone who comes around, one solution would be to use regular movement component and increase the max walk angle to something reasonably higher for example 70, and the in the tick check if the floor angle is greater than a lower threshold like 50, if so apply movement input in code in direction of impact normal. The component will then handle anything higher with that 70 with regular "Falling" state.
answered Sep 20 '18 at 03:32 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here