I’m working on a golf game (blueprints only at the moment) and want to show the projected path of the ball before the player swings. Predict Projectile Path works beautifully for this… or it would, if only it could take into account not just gravity and launch velocity, but linear damping as well.
My projected path would always go much further than the real path. After some head scratching I figured out that If I set the linear damping on my ball to zero, then the predicted path matches the final path perfectly (after the ball has actually been launched). But there has to be some linear damping on the ball, otherwise its trajectory is completely unrealistic as it doesn’t lose any forward velocity until it’s on the ground.
Does anyone know if there’s some way for me to predict the path with linear damping as well as gravity? Seems like maybe it would only be possible in C++, but hopefully not?
I’ve read that the linear damping is calculated as (damping * velocity * mass), and so I’ve found a way to approximate it by getting the projected path, then taking all the projected points and progressively reducing the XY movement from point to point by a greater and greater amount (so the XY distance travelled gets progressively smaller). But obviously it would be much better to get UE to calculate it properly.
Thanks very much for anyone’s insight!