Created
June 21, 2011 00:29
-
-
Save greggraham/1036963 to your computer and use it in GitHub Desktop.
Unity script for dropping objects
This file contains hidden or 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
// This script provides the ability to drop objects. | |
var newObject: Transform; | |
function Update() { | |
if (Input.GetButtonDown("Fire1")) { | |
Instantiate(newObject, transform.position, transform.rotation); | |
Debug.Log("Object created?"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment