Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Throw Bomb to Pos

Discussion in 'Scripting' started by XpDeviL, Aug 17, 2020.

  1. XpDeviL

    XpDeviL

    Joined:
    Jul 30, 2020
    Posts:
    1
    Hi,

    I'm making a 2d platform game. There is a player and bunch of enemies in the game. I made a throw bomb system. It throws bomb with certain speed. But I want to throw the bomb where enemy or player is. So throw it to the position. How can i do that?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,327
    There are equations to calculate the trajectory to lob something at a specific spot.

    Look up in google: unity trajectory

    I just looked and there's quite a few tutorials.