love logs like the one i am about to write. it feels like i got so much done in so little time… or maybe time has been flying by. woke up at 5 am this morning with my mind itching and have just called it quits. its a great feeling.
i did waste a bit of time over the past few days though, trying to implement something you would think is so simple. a feature almost every game has, the classic post hit invinc/sibility; well, not so much the invinc, but the invis. i spent hours trying to modify the color attribute’s alpha of the player ship to achieve a blinking effect and eventually actually hit a bug… so at least its not my fault.
then once again, Mecanim to the rescue. it was so easy to modify the attribute with an animator controller inside Unity, i had it done within minutes. i also whipped up a little rig for the player ship, so i can drive it with physics for the player controller script and animate some rotation onto the mesh when it takes damage as well. maybe there is another way to do this, but this is what eventually worked. there is no renderer on the top node, just a collider and the mesh and rig are parented under in the group. when animating, i used the root joint and created an additive layer to separate the flashing and rotation. it works nice.
i should calculate a more intelligent way to send knock back direction and still need to add sound effect. oh, i finally implemented the player health system and all that is working too.