Search Unity

2D Vector algrithms

Discussion in '2D' started by Andrew-Yu, Jul 6, 2019.

  1. Andrew-Yu

    Andrew-Yu

    Joined:
    Feb 27, 2015
    Posts:
    1
    Hi
    May I ask if there're any 2d vector algrithms built in unity script api? which handles 2d geometry like Polygon, LineString, and provide utility methods like Polygon Joint(Polygon a, Polygon b) etc.
    What I'm trying to do is create runtime colliders according player's touches, these colliders will be in a random shape as the player wants, so it must be done with polygon colliders(I'm new to u3d, so if there's any other way I'm very happy to hear about it), then I need to generate points presenting polygon using the path of player input on screen.

    Thank you. Have a nice day!