Scene component lags behind actor

Hello, wondering if anyone can help me out.
I’m currently working on a 2d platformer style game. I’ve attached a scene component to my character to use as a spawning point for projectiles. I’m spawning both a projectile and a beginning shoot animation. For my beginning shoot animation, I’ve created a blueprint that re-aligns itself with the actor’s scene component every tick that way it will travel with the actor when it’s moving.

This seems to work for the most part, but it seems like the scene component lags behind the actor for some reason. Have I setup the blueprint logic wrong? Or is there a way to change the physics on the scene component so it will stay fixed in its position relative to the actor?

Here’s an example of the lag. You can see the blast animation lowers below the blast opening during beginning of the jump, and re-aligns as megaman starts falling
scene-component-lag

Here’s the blueprint logic for the beginning blast logic:

Any help is greatly appreciated! Thanks!

Hey @vanceism7! Welcome to the forums!

So what’s happening here is your scene component is behaving exactly the way it’s supposed to: it’s remaining lined up to the spot that it is placed in relation to the origin of the actor. This other blueprint you’re using, though, is not lined up because it is another entity, and it is lagging because updating things like this on tick, it’s still going to be noticeable.

What I suggest is: Instead of having your projectile spawn on another blueprint, add another 2dsprite component on top of that scene node- keep that scene node for spawning your projectile, though. Then on fire, use that secondary 2dsprite to play the muzzle flash anim- but do it on your player’s bp. That way it’s 100% connected. For jumping, you can maybe have a second scene node on each side to switch to if “Inair-true” and switch back upon landing. :slight_smile:

Hey thanks for the quick response! The more I thought about it, the more I realized you were right, the tick animation just isn’t quick enough to keep it aligned. Adding the flash animation directly to the actor fixed the issue. Thanks again!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.