Post by baron on May 28, 2020 1:39:45 GMT
Hello, I am trying to make a generic animation that creates a particle effect shield, which blocks projectiles. I'm thinking that the way to do it is to create a sphere collider/empty object the size of the shield, and have that collider only be active during the animation. Possibly set the tag of it to "player" so that enemies continue to attack it, but make the damage percentage taken be 0.
I'd appreciate some advice on how to do this, or if there is a better/easier way. One other thought was to simply make a shield, hide the mesh renderer, change the block animation to a defensive spell casting stance, and trigger the particle effect to play while blocking via events, and change the bullets to be blockable. But I'd like to have it as a separate cast in the above version, so that I can have a weaker block with my melee weapon, and also so that I can stop incoming projectiles while my ranged weapon is equipped. Thanks!
Update: Figured it out! Going to leave this post here in case anyone else wants to know. So its basically this video : - except instead of a flamethrower, its a magic shield. And inside that particle effect, I created a sphere object that is the same size as it. Set the tag / layer to player. Uncheck the mesh renderer so its invisible, and then under the event receiver on your player character, add an additional effect to the start/stop events of your shield, and drag/drop the sphere object into it. On the start of it, set game object to active. And then uncheck the box on animation end, so that its inactive when the shield ends. Really happy with this and kind of surprised there wasn't already a post up here about it. But now there is.
I'd appreciate some advice on how to do this, or if there is a better/easier way. One other thought was to simply make a shield, hide the mesh renderer, change the block animation to a defensive spell casting stance, and trigger the particle effect to play while blocking via events, and change the bullets to be blockable. But I'd like to have it as a separate cast in the above version, so that I can have a weaker block with my melee weapon, and also so that I can stop incoming projectiles while my ranged weapon is equipped. Thanks!
Update: Figured it out! Going to leave this post here in case anyone else wants to know. So its basically this video : - except instead of a flamethrower, its a magic shield. And inside that particle effect, I created a sphere object that is the same size as it. Set the tag / layer to player. Uncheck the mesh renderer so its invisible, and then under the event receiver on your player character, add an additional effect to the start/stop events of your shield, and drag/drop the sphere object into it. On the start of it, set game object to active. And then uncheck the box on animation end, so that its inactive when the shield ends. Really happy with this and kind of surprised there wasn't already a post up here about it. But now there is.