2D Mobile Game: Player Clean Up

Ryan McCoach
3 min readApr 2, 2022

--

Intro

In this article, we are cleaning up the player’s sword arc image. In a previous article I create a solution that had the sword arc be activated and deactivated using an animation behavior script. It did the job, but there is a much more simple and elegant way to fix this problem and I want to make note of it.

Fixed!

Clean Up Sword Animation

The first frame of the sword arc animation is showing since we used it for the game object that will play the sword arc animation.

In fixing this, we are going to modify the alpha channel to make the image start off transparent.

We set the Alpha channel to 0, and now the sword arc image is transparent.

With the image being transparent, when the animation plays the image remains transparent, so we just need to make it turn the Alpha back up whenn the animation plays.

In the Animation, we hit the record button and select the first frame. While recording, we select the Color of the image and turn the Alpha back to 100 and hit the record button to save the changes. This will now have the image appear for all of the animation frames, but keep it transparent when not playing.

--

--

No responses yet