Search Unity

Generate collider from mesh on a 2d plane.

Discussion in 'Scripting' started by ProjectCryken, Sep 23, 2014.

  1. ProjectCryken

    ProjectCryken

    Joined:
    Jul 25, 2012
    Posts:
    41
    I am building meshes at runtime that's vertices only go along the x and y axis. After generation, I would like to generate a collider based on my mesh that will be able to collide with other similar meshes. Obviously, a standard mesh collider won't collide with other mesh colliders, so I assume what I need is a polygon collider to draw around the edges of my mesh? How would I go about doing that at runtime? I'm using C#.

    Cheers!