Question about collision and trigger

Hi! I have done a game and have some problem about that.
If a ball (Tag as player) hit the pipe(Tag as standard pipe), the ball will return to
starting point(A empty object tag as respawn).

How can I write it? Should I need to tick the trigger box?(Ball have a rigid body)

Take a look at the scripting reference for collisions. http://unity3d.com/support/documentation/ScriptReference/Collider.OnCollisionEnter.html has an example. Then browse around for those terms and you’ll find plenty more examples like that and general info on colliders, triggers and so forth.

In general, Triggers and Colliders can both detect what “hits” them. Use a Collider for a “real” object, which most things bounce off of. Use a trigger for a “zone” (around a fire?, entrance to the library, … )

You have your choice of whether the pipe detects when the player hits it (would need to add a script to the pipe, or add to existing one,) or whether the player detects when it hits the pipe.

If the ball is using a characterController (which is odd for a ball,) then you have to use a special one, that only works on the sphere. http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.html has the list of the “what happened this frame” functions. Take a look at OnCharControllerHit. There’s an example.

1.I know there are many example, but the main problem is THERE ARE TOO MANY EXAMPLE!!!
2.Your explain of Triggers and Colliders are really outstanding.
3.That means I need 2 script?