Search Unity

How do you get an angle of a point on a collider?

Discussion in 'Scripting' started by sotrosh, Nov 16, 2018.

  1. sotrosh

    sotrosh

    Joined:
    Dec 25, 2014
    Posts:
    13
    Hi guys,

    I'm new in Unity/C# and have a problem with properly placing "player" which is game object and box 2d collider on edge collider surface. The idea is that user swipes left/right and "player" smoothly slides left/right directions.
    Here is an illustration I made which describes the problem above:
    unity_screenshot.png

    P.S. I would like to avoid using of physics if possible.

    Thank you, in advance.