Auto-adjusting the VectorForce of a jump pad based on target location

Consider the following code:

	if jumpVector == nil then
		jumpDist = (targetPos - ident:GetPivot().Position).Magnitude
		local vector = (targetPos - ident:GetPivot().Position).Unit
		jumpVector = Vector3.new(
			vector.X * jumpDist * 10,
			vector.Y * jumpDist * 10,
			vector.Z * jumpDist * 10
		)
	end

targetPos is the Vector3 location of where I want the player to land. The problem is that there seems to be a non-linear component when calculating the force that’s needed to send the player to the destination point. The distance from the pad to the target plays a role, but there’s something else that’s missing. The constant 10 is arbitrary, but I think it needs to be replaced with a non-linear function. I’m not sure which one one. Any ideas?

Note: Force has been adjusted for mass and gravity.

EDIT:

I should probably mention that the jumpVector value is directly applied to the VectorForce.Force property.

Probably need to factor in the assembly mass.

Handy formulas:
F=ma
a=v/t
v=x/t

F is force
m is mass
a is acceleration
v is speed
t is time
x is distance

Currently you’re only using the distance?
You can probably choose an arbitrary value for the speed.

Might also need to add a dragforce to prevent overshooting and jittering.

Remember you’re working in 3d, can make math a bit complicated. Assembly mass is a constant, the remaining values are vector3s.

EDIT: Ah I didn’t see your note, sorry. Would you mind showing how you’re adjusting the force for mass and gravity?

					local adjustedMass = root.AssemblyMass / config.jump.referenceMass
					local counterGravity = root.AssemblyMass * game.Workspace.Gravity
					local force = Vector3.new(
						jumpVector.X,
						jumpVector.Y * adjustedGravity + counterGravity,
						jumpVector.Z
					) * adjustedMass

That’s inside the touch event for the pad.