Over last week I have implemented a number of different features
such as teleports, scores, fixing movement and collisions for players, mini-maps.
First of all I added particle effects to make
teleports look as a magical portal and I have also made a teleport prefab that
can be easily dragged into the scene and adjusted in lots of ways keeping all
teleport mechanics as it should be.
I have encountered one major problem with
implementing teleport script to change player location when he enters teleport
trigger area. As the player has Rigidbody attached it made the main character
rotate as crazy after just basic position change. I manage to find an algorithm
for this online here. Applying the second algorithm solved the problem and even
though I used ready algorithm I wrote the rest of the code myself. This
improved my knowledge about Rigidbody component as I have never used them
before in my last game (at least not for player character).
Basically this time I ended up writing simple
3rd person character controller without realising it! I had
some other problems with main character movements and collision detection which
I solved by using Rigidbody friendly script methods and variables.
I also added basic score counter for both the
shadow and the main character so now it displays both on the screen and I made
sure it counts it correctly. Score system uses private variables and get and
set methods to access it from different scripts. If I have time later on I will
try to implement get and set methods for every variable in scripts that will be
accessible through the Inspector in Unity.
I have also added teleport mini-map pointer to
teleport prefab so now-main character, shadow and teleports have their pointers
on the mini-map. Next thing I will add to mini-map is border to make it easy to
recognize which mini-map is which...
Next things to implement are as follows:
collectable items, traps, 3D models that will make scenery look good, mini-map
border, sounds and I need to think about the main goal of the game…