I am having a big problem with slopes. My character has a hard time climbing them. In the GIF, the red dot represents the player’s center, the green line represents the direction that the player moves, and the purple dot represents the position of the ground underneath the origin of the character.
Since I am not using HipHeight, my character’s collision touches the slope and stops it from moving forward.
Can anyone think of a solution or do I have to implement a custom version of HipHeight?
(It’s not hard for me to implement it, I just prefer a solution without.)
EDIT: this might be very dumb and not even work but - what about adding a fake ground under the player? Raycast under the player and set the fake ground’s position to ray hit position every frame, and ONLY position and not surface normal, so it doesn’t struggle with climbing stuff. I guess you can kinda create a slope angle limit with that.
There are 2 potential solutions to be tried separately.
Remove all friction from the character, set the frictionweight of the character part to 1, and give it an upwards vector force that cancels out the workspace gravity. This would presumably reduce the resistance given to the character from colliding.
Replace the pill shape with an upside down cone, minimizing the collision area that currently blocks the character from moving.
As of now, I do in fact have a vertical force. You can see the green arrow pointing up the hill. The direction is based on the normal that is under the player. The problem with that is the player’s collision blocks it from moving that direction.
Setting the part’s friction to 0 seemed to help. It made it really apparent that the gravity is pulling the object down. How would I counteract the gravity?
The general expression for the absolute force caused by the workspace gravity would be workspace.Gravity * part:GetMass()
where the part referenced would be the character.
Ideally, you would put this in the Y component of a Vector3, which is then set to the force of a bodymover, cancelling out the force of gravity.
Strange. Well, not the fact that it’s floating. In retrospect, a better recommendation would’ve been a VectorForce instead, as it can be disabled and enabled when needed. When the character touches the ground (or whenever the purple dot meets terrain), the force would then be enabled, and otherwise, it gets disabled.
What is strange is that it actually appears to be floating upwards instead of staying still. Weird…