I would like to implement a system that detects if the character has flipped and then attach a particle effect to it and maybe a counter that goes up every time. I don’t know how to implement this though.
I think it should go something like this: (pseudocode)
if (Transform.Rotate(z-axis) = 180)
{
Debug.Log(“Flip!”)
}
I don’t know how to actually single out the z-axis variable on the rotation to make this work.
I know this mechanic is not a part of the course, but I think it would help make the game into an actually fun game.
If somebody could help me on this, that would be greatly appreciated.