Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Colliders or raycast to detect the player

Discussion in 'Physics' started by Erunesuto, Nov 7, 2019.

  1. Erunesuto

    Erunesuto

    Joined:
    Apr 20, 2017
    Posts:
    7
    Hi :D

    I dont know if my question is here.

    I am doing a 2D game, something similiar to a metroidvania.

    I am doing the typical enemy who detects the player and follow him. I am doing it with colliders and it works good.

    I have never used raycast before so my question is: What is better for this kind of mechanics and why colliders or raycast?