Created
July 6, 2014 07:42
-
-
Save yandod/24427808dea1031943c6 to your computer and use it in GitHub Desktop.
ball
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
var original:Vector3; | |
function Start () { | |
this.original = transform.position; | |
} | |
function OnCollisionEnter(other:Collision){ | |
if (other.gameObject.CompareTag('Player')) { | |
this.transform.position = this.original; | |
GetComponent('AudioSource').Play(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment