Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ControllerColliderHit.gameObject

public var gameObject: GameObject;

Description

The game object that was hit by the controller.

	// Objects we touch, move them to position (0, 0, 0)
	function OnControllerColliderHit(hit : ControllerColliderHit) {
		hit.gameObject.transform.position = Vector3.zero;
	}