How to make a player jump in an arc

I’ve been trying to replicate a move from Jujutsu Shenanigans that had the player jumping in an arc.

The problem is i can’t figure out how it was made, it cant be tweening or lerping because im pretty sure that’d make the player go through walls, either way i dont think those two should be used.
It also can’t be any physics based solutions.
I’m half sure it uses bezier curves somehow, but the move can be redirected in the direction the player is facing, which means each point of a bezier curve is generated before a player reaches the previous point, maybe it could use align position or linear velocity for the player to reach the points of that bezier curve, but i dont see how that would look as smooth as it does.

1 Like

Maybe use a combination of renderstep. I’d figure out what direction the character is standing in and render their position based on a sin function?

The positive part of the sin function could work as an arc, but from the video i think the arc is not exactly smooth like it.
Also If you mean changing the position of the player directly then I think thats not rly what is used here, as I said the move doesnt pass through objects and setting the position would do exactly that, you could use a raycast to prevent that but i think it’s unnecessary work

ah, I see what you mean. You probably do something similar to pathfinding and then recalculate the path if you come across an obstacle. You can see that the character was routed in one direction then when it encountered an obstacle the hitbox is large enough it switched directions.

Even though it seems like that at first, the redirection has nothing to do with the obstacle. The movement itself is supposed to be him swaying from side to side as does those hops.
I’m actually convinced it uses bezier curves now, the problem is how do you move a player along the curve without setting the position directly (to avoid phasing through walls

I haven’t played the game so it might not be 100% accurate but it’s very close.

The video demo looks like a simple parabolic arc seen in projectile motions.

You can create this arc by using either RenderStep, Stepped, or task.wait() to control the event based on framerate, then use projectile motion equations.

v = v0 + gt – velocity is affected by acceleration/gravity
p = p + v
t – position is affected by velocity

I will simplify things a lot and demo using a while loop and task.wait().

-- assume the enemy is grabbed here and you have network ownership of the enemy
-- this is a client script
local function noGroundBelow() 
	-- is there solid ground below your character? use raycast to check
end

local function bounceGrab(jumpVector: Vector3)
	-- play jump VFX or ground slam here if second jump
	while noGroundBelow() do
		local dt = task.wait() -- you can obtain dt in .renderstep and .stepped too
		jumpVector = jumpVector - Vector3.new(0,workspace.Gravity,0) * dt
		myCharacter:PivotTo(myCharacter.PrimaryPart.CFrame + jumpVector * dt)
	end -- this repeats until you hit the ground
end

bounceGrab(lookVector * 10 + upVector * 10)
bounceGrab(lookVector * 50 + upVector * 50) -- when you hit the ground, create another "jump" event
bounceGrab(lookVector * 100 + upVector * 100)

If you want more info on the arc and what the code means, search up “projectile motion”. Feel free to ask any questions below.