This a very broad question and therefore I am not necessarily looking for more than someone pointing me in the right direction. Whether the game is 2D or 3D, fighting game collisions is a challenging subject and ideas for the best possible way to implement such system in Unreal Engine 4 would be gladly welcome.
As you can see on this video, 2D colliders of different types and scales are spawned at unique locations for various duration depending on the characters’ actions. Because these colliders’ behavior is tightly linked to the animations, it goes without saying that having a visual interface to edit them would be a must. You can see an example of Mugen’s collision editor here.
Based on my limited knowledge, here are the different routes that come to my mind in order to implement such a system in order of difficulty:
- Try to leverage or extend Persona’s notification timeline.
- Use and existing third party editor and create a parser for Unreal Engine.
- Build a collision edition framework within Unreal Engine it self.
Thanks for your help in advance and I hope you guys can en-light me.
Hi Douglas,
You put not easy task before itself. However, are you sure you want to add you own collision framework or work with another editor?
I think the best way it is to use PhysX or Paper2D basis for collision detection. UE4 has many useful elements/tools to work with collision (generate it, retrieve additional information from collision, etc.). For example, you have a fighter (does not matter if it is ‘2D mesh’ or 3D mesh that moves in 2D space) you create PhysAsset and some animation (jump, walk, attack, etc.). In addition, you attach sword (with collision) to this mesh. UE4 allows to you determine whatever sword collide with another fighter or not. Also, let us say you want to make damage only when attack animation is playing, so you can use anim notifications to determine ‘damage period’. In addition, you can use Paper2D plugin that is wrapper around box2d library. Look at
Kind of a high level answer, if you have further questions, shoot them here and I can get more specific if you’d like.
Hope it helps!
Thanks for your answer . I agree that leveraging what already exists in Unreal Engine is probably the thing to do. That being said it seems that spawning the colliders and position them frame by frame instead of attaching them to the rig is an important gameplay mechanism in fighting games. I am just wondering if Persona’s notification timeline is convenient and powerful enough as it stands to support such heavy burden. I can see Persona spawning colliders at a given time and maybe set their positions and scale on a frame basis, but would that be really convenient when tweaking or scaling your game?