How to call an interface in anim notify?

I have currently a system where an notify enables and disables the collision of a class object. It’s working fine when a use get actor of class. But I couldn’t figure out how to make this work with an interface.

My anim notify is not triggerin the interface events.


I could fix my issue by using get all actors with Interface, but I would be glad if someone knows a more optimized method

use a print string to determine what the GetOwner return value is.

Mesh Comp->Get Owner is probably going to be returning the character that is doing the animation, I would think.

As eblade said, your method is returning the owner of the animation. So you’ll need to create another interface that can send info to your character BP, then you can call the weapon interface.

what I’d probably do is something like, have an interface EnableWeaponCollision and implement that in the Character, and also in the Weapon. Have the Anim Notify call it in the Character Owner, and then have the Character Owner call it in the Weapon.

You don’t want to reach far (or at all) into another object’s hierarchy of components, rather pass the message “Hey, please do this” and let that object figure out how, or pass it down to the next thing to figure out how.

I would consider doing something like “Get Owner->Get Weapon->Enable Collision” to be a bit of a “code smell”, as imo, it should be up to the character if it wants to do t hat, and then up to the weapon if it wants to do that.

1 Like