Is it possible to set visibility during an animation?

I’ve tried googling and searching the forum but can’t seem to find a simple yes or no to this question. I’m much more familiar with Unity and taking a stab at doing a project in Unreal.

In Unity, I would make an animation clip, and toggle visibility on or off for objects i’m animating. Is this possible in an animation or event graph? I haven’t been able to find any nodes that suggest it is when searching in the graph.

I’m making an object that explodes 1/3rd into playing the animation so I need to do a simple , play animation -> play particle event -> turn off visibility of object that “exploded”.

Am I approaching this incorrectly?

If the actor is supposedly being destroyed why not use Destroy Actor?

One of the interesting differences between Unity and Unreal 4 is how UE4 works more in a modular/component framework rather than on a per object bases. In context if we have an object said object can be included in a Blue Print class which adds properties that are not used or necessary in every instance of the same object. In your example you could spawn object’s animation but can be difficult to add the additional effects on a per object level.

If you take the same object you can put it into a pawn class you can more or less program what the object needs to do directly with in the BP class or instance. This includes turning on and off the viability or use in game conditions.

Sorry if it sounds a bit technical, it’s one of those things that’s hard until it becomes easy, but for the most part objects do need to be part of a BP class to access the advance parameter sets.

You can definitely hide the object via blueprint. But I’m guessing what you are asking is about using Sequencer?

I guess you have to define the parameters of what you need.

Are you making a Granade for use in gameplay? If yes, then BP is the way to go.

Are you making a short video example or a cutscene? If yes, then through sequencer you can control/toggle visibility and spark the particle effect as well.

Are you trying to make a melee weapon destroy on contact?
If yes, then create a BP for the weapon and add a collision detection trigger.
On overlap, if the conditions you need are met, you can remove the item from view. Additionally you can trigger a boolean or some sort of value for the AnimBP to know this has occurred.
In the anim BP you can play with Anim Notify on the play track to choose actions that need to happen (say attaching a weapon to your hand when extracting them). Or removing it (sheathing).

Are you using a projectile? Then the projectile needs to be coded accordingly. (Blatant example is the first person demo, the little balls you shoot do disappear).

That’s basically all I can think of about different usage cases. Hope one of them helps.

Thanks for all you replies it was really helpful in understanding the ways Unreal functions. I’m going to take a stab at trying to do it with BP / destroy method by either doing a play animation and then a timed wait to when to grab and destroy the pieces I need or maybe research and look to see if animations can call and event signal to my BP to tell it exactly when to destroy them. Eithe way i’m happy the community is so helpful here :slight_smile:

You can use a custom animnotify

You can call SetVisibility() on the mesh of your Object. Note that this is not the same same of turning off collisions for the object if it has any. You might need to deal with that separately.

If your object is a grenade. You can throw it, Call SetVisibility() on it’s mesh, Play your visual effects then call Destroy() to completely remove it from the game.