Lasers and conveyor belts
- pinkatomic
- May 11, 2021
- 1 min read
After implementing the new character controller we wanted to add variety to the gameplay with additional mechanics that utilized the new style of movement. It was important that while implementing these mechanics I also aided in the building of levels using these mechanics.
One of these mechanics were the laser sources. These are small boxes that shoot out a laser that on contact kills the player. Laser sources are very versatile as they allow level sections that enforce the use of the Sphera without blocking visibility of the other side. Where before there would've been a small gap or an obstacle to throw the Sphera over there are now deadly lasers! To make level building with laser sources easier I added a debug ray in the scene view telegraphing where the laser will go and if it will hit a surface.

Another one of these additional mechanics was the conveyor belts. Because the player was no longer a physics object there was no point in making functional physics based conveyor belts but instead I created a script that could be added to objects with trigger box colliders that would simulate conveyor belt behaviour on the player when they were inside. The conveyor model would then have to be placed alongside this “invisible” gameobject to give the full effect.
Once again to make sure building levels was easy using this mechanics I implemented in the scene view a red transparent box that would be showing for the gameobject the area and direction the conveyor belt effect would work in.
Building levels with these features is fast and simple, making the level designer's job much easier through smarter implementations.
Comments