- Home /
How can I activate a script upon entering an area?
I want my character to walk to the end of the level then activate the script:
{function Aplication.LoadLevel(2);}
HELP PLEASE!
Answer by hvilela · Sep 30, 2012 at 11:43 PM
Take a look at Collider.OnTriggerEnter.
Yes, and this video may help : http://www.unity3dstudent.com/2010/07/beginner-b13-trigger-collision-detection/
If you are just starting, the whole series is very helpful :
Start at the bottom and work up : http://www.unity3dstudent.com/category/modules/essential-skills/
Start at the bottom and work up : http://www.unity3dstudent.com/category/modules/beginner/
this is the YouTube link for the above as one playlist : http://www.youtube.com/watch?v=-oXYHNSmTxg&list=PL27B696FB515608D2&feature=plcp
$$anonymous$$ore tutorial links :
the Unity Wiki : http://wiki.unity3d.com/index.php/Tutorials
A list of resources : http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html
Nope, you are doing it wrong ....
Watch : http://www.unity3dstudent.com/2010/07/beginner-b01-basic-collision-detection/
and : http://www.unity3dstudent.com/2010/07/beginner-b13-trigger-collision-detection/
Read : http://docs.unity3d.com/Documentation/ScriptReference/Collider.OnTriggerEnter.html
NOTE : that trigger events are only sent if one of the colliders also has a rigidbody attached.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Setting Scroll View Width GUILayout 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Sprint Error script? 2 Answers
setup a php master server 2 Answers