The Right way to implement traps in UCC

Jorgefo

New member
Hi

Trying to implement a trap in a dungeon, like the Saw,' but I haven't found any examples to do this.

First i try with collider in the saw and add script to the saw to make damage to the character like this
C#:
    private void OnTriggerEnter(Collider other) {
        var health = m_Character.GetComponent<Health>();
        health.Damage(10);
    }
The character die in the 10 hit and is ok, but the ability "Damage Visualization" never active in the character (play mode), this is the configuration on the character

1692553014209.png

The character have the demo animator from UCC.

I dont know if i missing any configuration or any other step.

I try with de IDamageSource(explosion) but i dont understand to do this
 
Damage visualization only plays if the player is damaged from a hit point. By calling damage directly there is no hit point passed in. For this situation I recommend subclassing the Damage Visualization ability and adding support for regular damage events. We only have directional animations included.
 
Damage visualization only plays if the player is damaged from a hit point. By calling damage directly there is no hit point passed in. For this situation I recommend subclassing the Damage Visualization ability and adding support for regular damage events. We only have directional animations included.
Ok, Thanks for advice, I will try
 
Top