Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

2D Projectile fire velocity

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

  1. anubhav01

    anubhav01

    Joined:
    Feb 20, 2018
    Posts:
    3
    Hello,

    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