Help creating a trigger script?

Hey guys,

I’m new to Unity3D, but not to the coding side. I am having trouble creating a certain type of script and don’t know where to start. My basic idea is to do this

If a “First Person Controller” hits a particle, it will warp the player to a new terrain, basically change from one camera to another, now i have that done, but it’s the part were i get the player to hit the particle and then change the camera.

Can i access a script in another gameObject from say the first person controller?

Help any one, thanks:)

Well, if you give the particleEmitter a World Particle Collider component, then the particles will register collisions. If you click “Send Collision Message,” they’ll run the function OnParticleCollision(hit : GameObject) every time a particle hits a collider.

So, all you have to do is put that function onto the script for the player object and have it teleport you to the new area. If you want to control which area, tag the particle effect with a tag like “One” or “Two” and then move to different areas based on hit.transform.tag.