With the number of Zombies that inhabit the arena and the giant Iron Golem that needs to be killed at the end of the game, some players may likely fall victim and be killed.
Aligning this with the narrative of the game I needed to create a respawn system that would allow players to re-enter the arena as a new competitor whilst also being able to access their old loot. To this end I made use of the lootable dead bodies, Instantiating a prefabbed version and passing the players inventory into it.
Once this has happened the player is then moved back to the entrance pipe, which repeats it's initial entrance from the beginning of the game, seen in the video at the start of this post.
One thing I struck lucky with when creating this feature was the use of the death animation that plays when the player dies. Since the player character is just a pair of arms and legs,
I was worried that when they died and any animation played, seeing this would be easy and would break any immersion. Secondly, as the camera was not attached the rig it would not move with the body as it fell. However, after going through a few different death animation found on Mixamo I found one that worked perfectly, which is used in the game now. To fix the camera issue I created a death camera which is attached to the head in the rig, it is switched to seamlessly as the player dies so the player cannot tell.
Thanks for Reading!
Σχόλια