Search Unity

Question How do I calculate the required force to launch an object?

Discussion in 'Physics' started by alainjiehfeng, Jul 1, 2020.

  1. alainjiehfeng

    alainjiehfeng

    Joined:
    May 13, 2020
    Posts:
    60
    I want to use a rigidbody AddForce() or velocity 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...ump-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:



     
  2. alainjiehfeng

    alainjiehfeng

    Joined:
    May 13, 2020
    Posts:
    60