How to handle collision for fast melee animation at lower FPS?
I'm struggling to resolve this issue. In my game, melee combat makes up a large chunk of the gameplay, so it must be as frame independent as possible. Unfortunately, when I test out the collision at lower FPS (20 fps), the melee swings are missed completely. Currently the collision consists of simply a collision box with CCD enabled attached to a mesh, and that mesh is attached to the player's hand. At higher FPS it works perfectly, but once you dip below 30 it starts to miss very clear hits.
Here's what I have attempted:
Are my animations just too fast that I can't use them reliably? Is there anything I can do to achieve reliable collision at lower FPS? 20FPS I'd consider a realistic dip, but even at 25FPS collision still misses.
Wasn't Street Fighter V made in UE4? How did they handle their collision, it can't be framerate dependent can it?
Thank you for any help.
So what you want to do is use the block as well as the 'hit' events ("On Overlap" won't work anymore). Then you need to make sure the colliders don't collide with their owning actors. Most of that functionality involves the label "ignore", like "Ignore Actors" or "Ignore Self".
You may also need to set up collision channels so the weapons only hit what they need. But since your combatants are the same class (I assume) that won't be enough. If they happen to be different kinds of actors then it's pretty straight forward to set up two collsion channels so the weapons of one actor only hit the other type of actor (and vice versa) -- as well as any obstacles, which should be blocked as well.
I learned about this type of functionality by watching a tutorial from Epic. I'm pretty sure it covers what you need.. It can be found here https://www.youtube.com/watch?v=hRO82u1phyw.
Let me know if that isn't sufficient.
Follow this question
Once you sign in you will be able to subscribe for any updates here