Update: the Grapple Component has now been released on the Marketplace. Thank you all for your continued support!
Hello everybody
I am currently working on a Blueprint component that handles interdependent animations playing on different characters. This can be used to create a variety of game mechanics:
- Throws/holds in fighting games
- Stealth kills
- Takedown animations / Finishers
- Characters healing/reviving each other
- Character interaction in general
- Interactions or short cinematics
Some examples of game mechanics the Grapple Component would be able to emulate:
https://media.giphy.com/media/TFaR6wGBmYaU4g0Icv/giphy.gif
I noticed that mechanics like these are often used in games, but that they require some more scripting/programming than meets the eye. While players will mostly notice the animations that are playing, the Grapple Component handles what happens behind the scenes:
- Repositioning characters, which can be done by graduallly sliding them into place
- Synchronizing animations (including blendspaces and their coordinates)
- Attaching one character to another where applicable
- Enabling/disabling different kinds of input as needed
- Dealing damage based on the animation
- Retargeting a single animation to work with different (eg. taller vs smaller) characters
- Handling the camera (for example in a third person game, the camera could remain user controlled, or it could be driven by the animation for a more cinematic effect)
- Managing the control rotation if components of the character depends on it
- Returning all characters to their previous state after the interaction is done
- Seamless transition between animation and player controlled movement
- And last but not least: Multiplayer support
All of this is done while keeping things as simple as possible for the developer. Using custom nodes, the developer can call general functions on the Grapple Component, like “acquire target”, “attach”, or “play animation”. These commands are simple to use, yet highly customizable.
The Grapple Component can be added to any actor Blueprint, but works best with a character Blueprint (because it relies on the character movement component for some of its functionality). Because most of the logic is handled within the Grapple Component itself, the user can implement all of its functionality with little effort.
*When the F button is pressed, we call a function called ‘acquire target (hitbox)’ in the Grapple Component. This uses a box collision component to look for a potential target. If a terget is found, we call the ‘pair/unpair’ function in the Grapple Component. This function handles all aspects of the animation, repositioning and variables that need to be set to blend the animations with gameplay. The developer can easily set the parameters of a grapple by plugging a struct (the largest node in the image above) into the ‘pair/unpair’ node. *
The functionalities of the Grapple Component can be implemented in various ways. For example, a character can be launched and acquire a target in mid-air for some interesting pounce-like mechanics. The animations are very much a work in progress, and the focus of this asset pack would be the blueprint components and not so much the animations themselves.
https://media.giphy.com/media/gj0iBi0WLm1oA5i4pS/giphy.gif
I am also working on a system for Animation Matching.
Some animations will no longer match each other if they are played on skeletal meshes with propotions that are different from the one used for animating.
The Animation Matching feature attempts to remedy this mismatching by a certain extent. If Animation Matching is enabled, the Grapple Component will move the location of certain bones in the owner’s skeletal mesh to match the position of certain other bones in the skeletal mesh associated with another Grapple Participant.
This means that the character’s animations are adjusted at runtime, based on the Skeletal Mesh the character is interacting with.
The Grapple Component features a function to have characters be pushed in a certain direction. This functionality can be used to generate pushback after a grapple animation, of to have a character charge forward.
https://media.giphy.com/media/llJ8PDO2F4bkaiowrf/giphy.gif
Player Controllers can pass input through the grapple component in order to create ‘branching’ animations, as illustrated below. The example on the right also illustrates the possibility to launch characters after or during a grapple animation. You might notice that the initial animation in both examples is using a blendspace asset, and that the coordinates are being synchronized between characters. These examples also show the retargeting system in action when interacting with smaller and larger models.
https://media.giphy.com/media/cjVzioPih0Rvee1h7a/giphy.gif
While grapple sequences will typically only contain only two participants, it is also possible to have more characters participate in the animation.
https://media.giphy.com/media/l2GMUsynyqP4DwQF56/giphy.gif
The Grapple Component can be controlled from the character Blueprint or using animation notifies. Advanced controls are available and exposed to the user.
https://i.imgur.com/BzcrJJX.png
Macros are available to simplify this process.
These are the aspects of the Grapple Component i have already put some work in, but i will surely add more functionality if there is some demand for it!
Do you think the community would be interested in something like the Grapple Component on the Marketplace? Got any other questions, requests or suggestions? Be sure to let me know!
Kind regards
https://forums.unrealengine.com/core/image/gif;base64