Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

2D Vector algrithms

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

  1. Andrew-Yu


    Feb 27, 2015
    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!