Search Unity

2D Projectile fire velocity

Discussion in '2D' started by anubhav01, May 17, 2019.

  1. anubhav01


    Feb 20, 2018

    I have a 2D game where 2 GameObjects are approaching to each other.

    I want to calculate the velocity with which the 1st GameObject should fire a projectile so that it hits the 2nd GameObject.
    The following things are known:
    • Velocity of both the GameObjects(with which they are moving)
    • Distance between the GameObjects
    • Angle of firing trajectory is fixed i.e. 60 degree
    Please help me in figuring out the velocity

    Let me know if anything else is required.
    Last edited: May 18, 2019