Search Unity

OnMouseDown() without Collider?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Filosof, Sep 18, 2016.

  1. Filosof

    Filosof

    Joined:
    Sep 8, 2016
    Posts:
    6
    Hello friends!
    I'm trying to select my shooting tower by OnMouseDown function. It works fine.
    But I have a sphere collider of that tower much more than itself because I am using a OnTriggerEnter function to detect whether enemies have entered my circle to start fire.
    So OnMouseDown function doesn't work the way I want.

    Is there any way to solve that? Or is there any function that I can use to select my tower without using a Collider?

    Thanks in advance!
     
  2. Filosof

    Filosof

    Joined:
    Sep 8, 2016
    Posts:
    6
    Solve that with Physics.OverlapSphere function!
    The thread can be closed.