Search Unity

Top Down Shooter Aiming - How to lock the vertical axis?

Discussion in 'Editor & General Support' started by twistedcitizens, Nov 29, 2015.

  1. twistedcitizens

    twistedcitizens

    Joined:
    Nov 20, 2015
    Posts:
    25
    Hello,

    I am working on a top down shooter. The aim system is using a mouse pick and fires out a raycast to shoot enemies. Currently, the player needs to point the cursor directly at the target in order to inflict damage. But I would like it so that only the horizontal axis of the aim is the only thing that needs to be accurate in order to hit the target and ignores the vertical axis (just like how Hotline Miami or Halo Spartan Assault works).

    Basically, I would like it so that the enemy is still hit as long as the X and Y are lined up regardless of the Y axis. I am also using PlayMaker so it would be great if I can get some suggestions in PlayMaker terms. Any hints would be much appreciated though!