Help with moving an object when enters a trigger.

Updated on May 12, 2017 in Unity
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
2 on May 11, 2017

I would like to know how can i make that when my ball (main player) enters a trigger it position changes. In other words that when it reaches the trigger it teletransportate to other point in my map.
Thanks!

  • Liked by
Reply
1 on May 11, 2017

void OnTriggerEnter(){

player.transform.position = new Vector3(x, y, z);

}

Maybe it works 🙂

on May 12, 2017

I´ll try it thanks!

Show more replies
  • Liked by
Reply
Cancel