GML AIM ASSIST

Discussion in 'Programming' started by zampa, Dec 6, 2018.

Tags:
  1. zampa

    zampa Member

    Joined:
    Jul 9, 2017
    Posts:
    28
    I what to give my bullets some aim assist to make it a little easier to hit enemies, a was thinking about different ways to do this, I would draw some collision lines to detect the enemy object before the bullet fires, if the lines detect something they set the new direction otherwise the direction is unchanged.

    That's how i would do it, are there some other ways?

    thanks
     
  2. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,203
    I've done this a little but the results were sometimes a little glitchy and so I removed it. (So take my advice with a grain of salt). But when aiming, I tried to look at every enemy (parent object), get the point_direction from the player to the enemy and then compare it to the current aim angle. If it was within 10 degrees I would just snap the aim to the enemy. To do it properly though you would may want to sort it so that you are either assigning the aim-assist to either the nearest enemy within 10 degrees, or to the enemy that's angle is nearest to the aim. That's where it can get tricky if you have multiple enemies on the same line. May or may not matter depending on your game.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice