Mine does that occasionally. Attacked her own shadow a couple weeks agoMy cat Archie had me worried last night when I got home from work around 12:30AM. He was acting off and refused to let me pet him at all. He was also growling and hissing at me.
Today, he's completely back to normal and is loving on me. I already told my dad to see if his vet will see him as soon as possible to check him anyway