Created
September 14, 2014 17:50
-
-
Save antonkudin/0cb9f96dbf525eca119d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void putToFloor(){ | |
RaycastHit2D hit = Physics2D.Raycast(transform.position, -Vector3.up); | |
if (hit.collider != null) | |
{ | |
transform.position = hit.point; | |
Debug.Log ("Putting here: "+transform.position); | |
} | |
Debug.Log ("Found nothing to hit: " + hit.point); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment