Search Unity

Using Platform Effector as One-Way collision callback ?

Discussion in '2D' started by RemDust, May 27, 2018.

  1. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    432
    Hi guys,
    I'd like to know if there is a clean way to get collision callbacks only when collision occurs in a specific direction. :)

    I mean, it looks like platform effector 2D should do the trick but I haven't been able to achieve the expected results (maybe because I'm lame xD )

    Anyway, how do you guys get your callbacks "direction selective" ?
    I know that I could use if statements and check for positions and/or speed values but it seems kinda "hacky".
    Thanks all !