Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Creating a collision map for 2D map

Discussion in 'Scripting' started by sp00ks222, Aug 7, 2012.

  1. sp00ks222

    sp00ks222

    Joined:
    May 12, 2011
    Posts:
    37
    I have a 2D level that I have built in my map editor, and I was wondering the best way to create a collision map for it. I have a collision map layer in my map editor, which saves each node (for example, a rectangle would be just 0,0 0,50 50,60 0,60) I was just wondering how I could take my node locations and convert it to a collision map for Unity.

    Thanks!
     
  2. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,681
    do you mean equate positions in the map, to real world positions?
     
  3. sp00ks222

    sp00ks222

    Joined:
    May 12, 2011
    Posts:
    37
    position in the map would be best. but I could work with real world positions as well. As my map's bottom left corner would be 0,0... I would love to be able to read the locations of the collision map and just map them to Unity (by code). I can do this in Flash, just not sure how I can make custom colliders
     
  4. sp00ks222

    sp00ks222

    Joined:
    May 12, 2011
    Posts:
    37
    It has to be possible! Tools like ragespline is using custom colliders