FPS Independent Animation Swings

Heya,

I ran into a nasty issue regarding animations and fps. Namely, my character has several melee swing animations and anim notifies in those swings tell the weapon to enable and disable damage. The weapon’s collider is then enabled and on overlap it processes targets hit.

Unfortunately, since animations are fps dependent, it can very well happen for the weapon to be in one spot (before the enemy) in frame X and in another spot (past the enemy) in X+1, so the collider never registers the hit.

One (rather cumbersome) solution that came to mind for this problem is exporting the motion curves of the weapons as part of the animation, sample those every few frames while weapon damage is enabled and do shape traces to detect what the weapon hit.

What kind of system do you guys use for Paragon or Fortnite? How do you get around the animation fps issues?

Best regards,
Damir H.

We have had solved this issue by importing higher fps animation, but this doesn’t help if you have really low fps.

One (rather cumbersome) solution that came to mind for this problem is exporting the motion curves of the weapons as part of the animation, sample those every few frames while weapon damage is enabled and do shape traces to detect what the weapon hit.

Doing shape trace from location from previous update to from new update should work? Not sure why motion curve is required. Motion curve will also be evaluated with animation?

The other option we recently added by community is step interpolation. That might help? That will come out with 4.12 though.

Thanks,

–Lina,

We had the same issues with tunneling on our project, and solved it by doing collision sweeps with our weapons. Even at 60 fps very fast attacks could potentially tunnel, so I don’t see a way around it.

Hey Lina,

Thanks for the answer. The reason I suggested motion curves was because, if doing just “From last to current position” it would be a linear trace that might not fit the arc of the swing. With motion curves I could step back as I missed due to my fps and do 2-3 sweeps to make sure I follow the swing arc.

However I will try just the simple method, will probably be sufficient.

When you said you import higher fps animations - what fps do you target? Is there a performance impact on higher fps animations?

Thanks again!

Best regards,
Damir H.

That is good to know. Thank you!

When you said you import higher fps animations - what fps do you target? Is there a performance impact on higher fps animations?

Mostly memory because now you have more data to extract from, but decompress still happens and blend still happens regardless higher fps.

For us, when the fps happens, but usually 60 or 120 fps. But again this won’t help a lot if your game hitches.

Thanks,

–Lina,