Search Unity

Set player position back of the box

Discussion in 'Scripting' started by AMIR_REZAs, May 26, 2015.

  1. AMIR_REZAs

    AMIR_REZAs

    Joined:
    Jan 20, 2014
    Posts:
    54
    I have collider for player and want to check if player's collider hits box's collider now player position change to be back of the hit point, like picture.
    I can do it by Vector3.Lerp but doesn't work nice, I don't know how can I do it in OnTriggerEnter.