Damage Visualization isn't working.

I have a Character set up with the damage visualization ability but the damage visualization animations never play despite the character taking damage from an item. The Additive layer is set up with only the damage visualization substate and an empty animation state called idle. The damage visualization substate has the same transitions as the demo and the damage visualizations shows up as active in the inspector when it should but the animation never plays. What am I doing wrong?
 
Have you set the correct ability index for the ability on your character? You can also turn on logging for the animator parameters on the animator monitor to see whether the correct parameters are sent to the animator controller.
 
Have you set the correct ability index for the ability on your character? You can also turn on logging for the animator parameters on the animator monitor to see whether the correct parameters are sent to the animator controller.
Yes, the animator ability index is correct. I turned logging on and the parameter never changes
 
So it appears that the problem is that the ability isn't being properly called through the damage system. I'm not familiar with the ins and out of the damage system so I'm not sure how I'd solve this.
 
Now you lost me. At first you said that the ability becomes active when the character gets damaged, but that the animator parameters are not set correctly.
You can put breakpoints on the OnDamage method of the ability. This is called any time the character is damaged, but the ability will only start if the damage is large enough, the attacker is not null, and the GetDamageTypeIndex returns a valid hit location. With this you should be able to confirm that the ability is correctly started / not started.
 
Now you lost me. At first you said that the ability becomes active when the character gets damaged, but that the animator parameters are not set correctly.
You can put breakpoints on the OnDamage method of the ability. This is called any time the character is damaged, but the ability will only start if the damage is large enough, the attacker is not null, and the GetDamageTypeIndex returns a valid hit location. With this you should be able to confirm that the ability is correctly started / not started.
I can see how I lost you. It seems like the damage visualization ability is somehow activating wrong (or not activating at all but appearing as active in the inspector) when called through the damage system but is working when directly called when automatic.
 
Anyway, I need to add some custom behavior to the health script anyway so I think I'll have it directly call the ability and see if that works
 
If there is a bug, we need to be able to reproduce it in the demo scene. So it would be good if you find a way to show the behavior in the demo and describe how to reproduce it.
If you go to the die/revive room in the demo and get shot by the machine gun, the damage visualization is started. If you turn on the animator monitor logging you can see the parameter changes are triggered correctly.
 
If there is a bug, we need to be able to reproduce it in the demo scene. So it would be good if you find a way to show the behavior in the demo and describe how to reproduce it.
If you go to the die/revive room in the demo and get shot by the machine gun, the damage visualization is started. If you turn on the animator monitor logging you can see the parameter changes are triggered correctly.
I'll see if I can setup a replicable scene
 
Top