Hello! I have a problem with my game. It is supposed to be slippery, so I made all parts have “ice” physics.
It works perfectly, but walking off of ledges while facing any direction gives the player a sudden burst of momentum.
I have tried to find solutions on the dev hub, but I couldn’t find anything to fix it.
Here is my current code!
for _, v in pairs(workspace:GetDescendants()) do
if v:IsA("Part") or v:IsA("BasePart") or v:IsA("MeshPart") then
-- PhysicalProperties.new(density, friction, elasticity, frictionweight, elasticityweight)
v.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0, 0, 4.25, 1)
Because you’re only applying to surfaces, it is bound to happen only on surfaces and therefore airstrafing(moving midair) is pretty much unhindered and unaffected by the supposed accelerating momentum. At the brief frame of leaving the surface, the character essentially can change the momentum almost instantaneously and therefore resulting in this.
Perhaps you should try changing the solution approach and the thought on the problem as “How to make the character have accelerating momentum regardless of surface?”. Try some hacky solution like turning the character into a sphere movement(where it feels like accelerating a sphere rather than walking).
Alright, that makes more sense! I’ve tried what you said and welded a sphere to the player while they’re mid-air, but it didn’t really make much of a difference. Hopefully I can find another solution!