In our previous post, SFX: Anticipation – Freezing Time, we explained how we implemented the time freeze effect to emphasis UFOs’ Special attacks and make them standout to be felt further. In this post, we examine how to add a spotlight effect to give those UFO Specials focus during Gameplay and add further emphasis!
This one was much easier than freezing time; not literally. The steps we carried out to create a spotlight on a Paper 2D Actor were as follows:
1- We created an Actor that would act as a transparent veil that shall sit between the orthographic camera and the world. It will be there to cover up everything so that we can set a spotlight on the focused Actor.
2- We implement functions within the to be spotlit Actor that puts the Paper 2D components slightly ahead of the Veil Actor and towards the camera so that they stand out ahead of the veil and not be darkened out by it.
3- We call the Veil to darken, and call the focused Actor to be uncovered by the Veil with the functions from the previous step.
The setup of where to call the above functions were already setup from the previous post, so it was rather simple to extent. Below you can see the difference between a Special being fired without any effects, and the below is a Special being fired with both the Time Freeze and the Spotlight.