Making a consistent dash ability that is affected by gravity

I am trying to make a dash system for my game.

The problem is that the velocity you are given is much greater in the air than it is when you’re on the ground.

My system right now uses a planar LinearVelocity to apply the dash velocity whilst accounting for gravity. I’ve tried lowering the friction and friction weight on all parts of the player but that didn’t work.

Edit: Tried applying an upward velocity to see if that would help, it didn’t.

I would recommend you stray away from making it physics based.
If you instead make use of something like a RunService.RenderStepped bind to move the player, you should see much more consistent results.

1 Like

maybe just use :ApplyImpulse()?

it’s not a constant velocity, but it doesn’t require coding a “braking” system
it’s really just one line of code that applies an impulse, and from my experience it’s the same regardless of grounded or in-air states

1 Like

Here is my 2 cents on this, its not bodymover being used fundamentally the the root of the problem is the built in humanoid having a built in air and ground friction, and even different air acceleration.

Most devs will make their own character controller (like me) for more customizability or try out the new character controller.

1 Like

Tested this first since it was the easiest, I still have the same issue unfortunately.

game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:ApplyImpulse(Vector3.new(0, 0, 1000))

You can use a LinearVelocity but set it to use zero force on the y axis.

To do this,

  • Set ForceLimitMode to PerAxis
  • Set MaxAxesForce to Vector3.new(math.huge, 0, math.huge)
  • Then set the velocity to your dash direction and set Enabled to false when the dash is finished.
2 Likes

But now because it’s a vector constraint, gravity isn’t applied.
Edit: Hang on I left another solution test on.

Is there any way I could solve the flinging?

Edit: I visited this post and it solved the tripping, but there is still some issues with bouncing off walls when dashing into them.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.