Categories
Game Creation Mastering Development

How do I calculate the required force to launch an object? [duplicate]

I want to use a rigidbody AddForce() method on an object to launch it over from the enemy to the player, like throwing a ball at a target.

The problem is, I’m not sure how much force is required to use in the AddForce() method and it is taking too long to figure it out, and adding to that, the force would be different if I was farther away.

I found this helpful guide but it is not in 3D: https://forum.unity.com/threads/how-to-calculate-force-needed-to-jump-towards-target-point.372288/#post-2415612.

Could someone explain step by step in an easy to understand manner how to calculate the force required to get an object launched perfectly onto a target? (I’m not very good at math, haha…) Here’s some images from that thread that will help illustrate the desired result:

Leave a Reply

Your email address will not be published. Required fields are marked *