Object moving OnTriggerEnter, please help?!

Hello all,

I have a quick question on making a gameObject move when you enter a trigger zone. In my scene, I have a cube named “movingcube,” and a FirstPersonController (Player.) I am trying to make it so whenever you walk into a trigger zone (a cube with the mesh renderer off, and the “Is Trigger” box ticked) it makes the “movingcube” move from Point A to Point B (One place to another.) If anyone could help me out with this problem, I would seriously appreciate it!! I’ve been trying to figure this out for a day or two, and I can’t wait to figure out how to do it! Thanks, guys! I really appreciate it! (If you need more details, feel free to ask.)

Hi!

Well, I think you will have add more details of which components you have attached to the objects.
Some code will be useful too.

What you want to do should not be too difficult to achieve, so don´t worry, you will figure it out soon.

In the meantime checkout the following Walker Boys´ videos in where they work with collisions for a small game. That also could help you a lot.

Watch videos 5-12 to 5-14.

You can Try with this tutorial

1st of all Debug.log when its enter in the range. If its printed over screen work on next thing .

function OnTriggerEnter (myTrigger : Collider) {
if(myTrigger.gameObject.name == “box”){
Debug.Log(“Box went through!”);
}
}