How to account for linear damping when predicting projectile/predicting velocity.

Hello all, I am trying to make my own game, and I have run into a problem that I don’t seem to know how to solve, so hopefully one of you might know the solution:

So I am trying to use the SuggestProjectileVelocity node to get the perfect shot speed for my basketball. I set up everything correctly to the best of my knowledge:

  • Start Location: The spawn point of my ball.

  • End Location: A point on top of my hoop.

  • Launch Speed: Using a for loop to go through 1000 different launch speeds to find one that works.

  • Override Gravity Z: Set to 0 to use normal gravity.

  • Trace Option: None (won’t work if I put any other option in).

  • Collision Radius: My projectile’s radius.

  • Favor High Arc: True.

  • Favor High Arc: False

Now my problem is that my ball is not set up as a UE projectile but as an actor, and I’ve already changed some physics settings on it to stop it from going Mach 10 when I bump into it; mainly: mass is set to 15 kg and Linear damping is set to 0.3. angular damping is 0.2 also, but I think it’s irrelevant.

And so the output velocity of my SuggestProjectileVelocity is always undershooting, and I tested it without linear damping (or with it set to 0.01), and it worked perfectly, but again, my ball acts like a missile, and it is super twitchy when replicated, so I’d rather keep it on. I tried to compensate for it using the physics calculation way (i.e., using Newton’s second law applied to motion with velocity-proportional drag), resulting in:

v(t) = v0 e^(-D t)

  • v(t) is the velocity at time t
  • v0 is the initial velocity
  • D is the linear damping coefficient (as used in Unreal)
  • e is Euler’s number (~2.718)
  • t is time (Here time is calculated as Distance/Velocity)

But now my ball is overshooting by alot, everytime, so I figured damping is not calculated by the engine this way. SOOO IDK what to do. Plan B at this time is to disable damping while we shoot, then reenable it after a delay, but that breaks a mechanic in my game that I’d rather have. I don’t want it to be perfect, just close to it, but I need to know the perfect “theoretical” power of the shot.

Sorry for the longgg post, and thanks in advance.

Also any suggestion for Perfect Syncing of an actor like my ball with fast movement so its perfectly replicated across server and clients, other than what i did which is set its physics to only simulate on server.

Honestly you’re so much better off just using PMC for the ball. Do not use physics. Enable bouncing. Initial speed 0.

Suggest Projectile Velocity “Toss Velocity” is what you want to apply to the projectiles velocity. With enough velocity it’ll get the ball to the hoop. Start with 800 and adjust as needed.


For multiplayer you don’t replicate the actual ball. You replicate the “Velocity and spawn location”… 2 vectors in a multicast.

Client shoots his ball and RPC’s the server to shoot. Server does its own calcs for toss velocity. It does its own non-replicated shot, then Multicasts to sims only to have the spawn a ball using servers velocity and location.

To limit execution from the multicast to sims only…
Get local Role == Simulated Proxy -> Branch [true]: do the action


Forgot to mention that you cannot use the camera component for rotation/fwd vector on the server. You have to use Base Aim Rotation (Pawn) and for camera location you have to use player Camera Manager -> Camera Location (Player Controller).

Best results if you use those on both client and server.

1 Like

Additional note!

SPV calculates an intersect point, like Near Zero in projectile trajectory. So using High Arc (false) your going straight to the target point. High Arc (true) tries to fall onto the target point.

With basketball you are generally shooting directly at a point in space above the target and letting gravity drop the ball onto the target point.

In projectile movement component (PMC) if you enable physics on the root component, what pmc is actually moving, then PMC is only applying a Launch Velocity. Think sling shot, versus sub-step interpolation.

What I’d try is PMC w/physics and have high arc off. Shot target would be a vector in world space that allows the ball to drop into the basket.

Velocity will vary depending on distance to basket. Full court vs free throw.

1 Like