Teleporter

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m (Slight formatting change to make script easier to copy paste for the lazy one.)
(Teleporter.js)
Line 5: Line 5:
 
<javascript>
 
<javascript>
 
var teleportTo : Transform;
 
var teleportTo : Transform;
function OnCollisionEnter (col : Collider) {
+
function OnCollisionEnter (col : Collision) {
 
     col.transform.position = teleportTo.position;
 
     col.transform.position = teleportTo.position;
 
}
 
}
 
</javascript>
 
</javascript>

Revision as of 20:31, 4 October 2011

This script works like the halo Teleporters, but you can shoot rockets in to it and it come out the other teleporter Have fun with it. BY Ryan Davis.

Teleporter.js

<javascript> var teleportTo : Transform; function OnCollisionEnter (col : Collision) {

   col.transform.position = teleportTo.position;	

} </javascript>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox