Log in or register to post comments

Trigger Script help.

December 25, 2012 - 10:30am #1

 

I have a GameOject with a 3D model inside. in the Game Object i put a Smooth Look At (script) and the target is the ARcamera.

I Put a cube without the mesh, to define the area that I want the gameObject start to look at the camera.
How can i adapt this script below, and where i put it.

 

function OnTriggerEnter (other: Collider){

    if(other.gameObject.tag == "cu"){

      var go:GameObject = other.gameObject;

      go.GetComponent(SmoothLookAt).enabled = false

   }}

 

Sorry, it's not clear to me

December 26, 2012 - 1:49am #2

Sorry, it's not clear to me what you are trying to do?

If it is basic scripting help you are after, then it may be better to go to the forums over at Unity as there may be many more people who could help you.

N

Log in or register to post comments