What's the best way to interrupt a LinearVelocity when it approaches a wall as to not cause flinging?

Hi,

Currently trying to implement a dash system, but a problem occurs when the dash is into a wall. When dashing into a wall, the player likes to get flung, sometimes extremely far, as they kind of just “slam” into the wall at full force and proceed to go flying. I’ve tried disabling the LinearVelocity and setting the AssemblyLinearVelocity of the HumanoidRootPart to Vector3.zero, but it will sometimes still push the player a little back. What’s the best way to cancel the velocity when approaching a wall so that the player doesn’t get flung?

You can approach this problem from two ways:

  1. Technical - you can try to figure out how to reduce the bounce that occurs through manipulation of part physical properties, like elastic or something.

  2. Design - you can implement a specific mechanic that if a player approaches a wall from an angle, the player will simply play an animation and bounce back a little… or just get crushed into the wall for the sheer velocity. :joy:
    Try some creative approaches! Make more control on what happens to players when they collide into the wall with sufficient velocity.

try raycasting from the player when the dash begins with a raycast length slightly longer than the dash distance, and if it hits a wall, just apply an equal opposing force with a direction to the raycast normal to stop them when they get close to it. Maybe try raycasting, hitting it, then have a while loop which breaks when the player hrp is near a certain magnitude to the raycast hit position

God, sorry lol, forgot about this post since nobody replied and it got drowned out.

My intention is to have the dash into a wall be chainable into a wall jump, so mechanics like that wouldn’t work