This script is not that difficult to understand. Basically the character moves at a certain speed in any direction. There are also waiting time implemented so that it wouldn't move all the time but to have mini breaks in between.
I downloaded Unity standard assets to get a basic first person controller script. The picture below shows how it is implemented. The first person controller provided by Unity comes with all basic settings needed for a first person shooter player character
Procedural item spawning I wrote a script to make the engine spawn a game object of my choice near the object the script is attached to. I also used a simple for loop to limit how many items are spawned when the code is run. The picture below demonstrates the code in action. Every time the code is run, the object will spawn in random places in the given area. Item Pickup system The code for the pickup system was very simple. All it has to do, is to destroy the item when collided and increase the counter. Pickup system in action as seen in the video below. via GIPHY
Comments
Post a Comment