Search Unity

Detect Objects near me?

Discussion in 'Scripting' started by gilson, Nov 17, 2010.

  1. gilson

    gilson

    Joined:
    Sep 13, 2010
    Posts:
    36
    I'm doing a 2d games, pretty basic stuff. And i want to that my character will have some 'special powers' and one of then is that he can move some moveable objects, like plattaforms that can help him get to the end of the stage. How can i make the player check for cloes moveable objects? I can put the moveables in a layer and the rotables on some other layer and then get the list of itens near him, right? But how can i do this?

    Can i apply a different color to the item that is iterating over aswell?

    Thank for the help
     
  2. milesamallow

    milesamallow

    Joined:
    Sep 9, 2010
    Posts:
    31
    I would look into Vectors and Transform.find, And it might help if you would give some more description.
     
  3. Chris Sinclair

    Chris Sinclair

    Joined:
    Jun 14, 2010
    Posts:
    1,326
unityunity