Player jump height lowers when running into a wall

When the player hits a wall and jumps their jump height is lowered. My game has an invisible barrier that you need to jump into often, but it’s very important to the game mechanics that the players jump height is consistent.

Wall collision jump compared to normal jump (usually the wall is invisible as a barrier)

I want the player to not lose height on their jump when hitting a wall. My two ideas?

  1. A physics based solution that I’m unaware of.
  2. Creating a non-physical barrier through script that only changes the players X and Z positions.

However, I have no idea how to go about this.

image
this might do it, not sure cus I have never done this anytime before.

So you can’t use an invisible barrier because the players jump height will decrease?

I’ve looped through each basepart and set friction to false but sadly it’s still happening.

Yeh, I’m making a volleyball game and I need the player to not jump over the net but they need to jump above it consistently.

umm just to be clear, did you set it as false or 0 ?

local physicsProperties = PhysicalProperties.new(0.7, 0, 0.5, 1, 1)

local function onDescendantAdded(descendant)
	if descendant:IsA("BasePart") then
		descendant.CustomPhysicalProperties = physicsProperties
	end
end

I believe it’s setting everything to 0 but I’ll double check each part.

Yeh, each part is set to 0 but it’s still happening.

try setting friction weight also to 0

Still happening :frowning:

Maybe the player jumps lower when they have forward momentum, or the y velocity is being cut off by the wall? Jump power might actually be power and not jump height. Maybe alternative could be to apply my own jump force, but even then the same thing might happen anyways.

Actually now that I think about it I don’t think that happens since running and jumping usualy results in the same height. I do think the wall is cutting the player momentum off though.

1 Like