Search Unity

How to recognize sides of and object

Discussion in 'Physics' started by Markof, Mar 26, 2015.

  1. Markof

    Markof

    Joined:
    Mar 26, 2015
    Posts:
    5
    Hello,

    I´m creating a magnet for my new game, and I need to check what side of the object is approaching the terrain, so I can repell or atract the macnet to the terrain.

    Im new to Unity and to proggramim. My ideas are to create 2 cubes, one for each pole of the magnet, and create separate box coliders. But I don't know how to move both cubes as one (the player is the magnet). Or to create 1 objet and 2 box colliders, but I also don't know how to refer to a specific collider inside teh object.

    Tks!