Making A 3D Maze Game in Unity - 4/10

Now we are going to make a goal point. It is basically a trigger collider which detects if the player has entered in its area. we will detect the tag of the game object which entered. If the tag is player the game will show us that it is completed.

we will also make some particle effect for the goal point. Make a new gameobject and name it as "goal". Make a sphere as a child object of the goal and set it like this. make sure the spheres position is at (0,0,0). you may resize the sphere if you need.

4.1.PNG

remove the mesh renderer. so that the sphere is not visible. check the isTrigger from the collider.

4.2.PNG

make a new c# script and name it as "end". open it in monobehaviour. copy paste this script and save it.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class end : MonoBehaviour {

public static bool endIt;
void Start ()
{
    endIt = false;

}
void OnTriggerEnter(Collider c){
    endIt = true;

}
}

Now go to unity. Attach the script with the sphere. Now we are going to make the particle effect for the goal point. I used three particle effects and a light for the effect

4.3.PNG

here is First particle system settings.

particle

4.4.PNG emission 4.5.PNG

size over life time

4.6.PNG

rotation over life time

4.7.PNG

renderer

4.8.PNG

Settings for second particle system.

particle

4.9.PNG

emission

4.10.PNG

rotation over life time

4.11.PNG

renderer

4.12.PNG

Here is the material setting I used. 4.13.PNG

settings for 3rd particle system.

particle

4.14.PNG

emission

4.15.PNG

shape

4.16.PNG size over life time 4.17.PNG

renderer

4.18.PNG

Now we are going to set a light. Create a Point light as a child object of the goal gameobject. Here is my setting for this light.

4.19.PNG

AUTHOR

READ NEXT

Boostlog is an online community for developers
who want to share ideas and grow each other.

Delete an article

Deleted articles are gone forever. Are you sure?