Extending Grasp Data - Vaei/Grasp GitHub Wiki
[!IMPORTANT] GraspData is held by any GraspableComponent to define how interaction occurs You can add your own parameters and access them too by following this guide
Accessing Grasp Data
If you have access to the GraspableComponent that you are interacting with, or want to interact with, you can always retrieve the data, including your own custom data like so:
Extending Grasp Data
You can subclass UGraspData, either in C++ or in Blueprint.
[!NOTE] If using Blueprint, you must create it as a blueprint and not a data asset Add the properties you require, and then create a data asset from your new blueprint
Application
Grasp offers extension points when abilities are granted or cleared that you can hook into, e.g. to grant an ability set or similar.
[!NOTE] This is only available on Authority
Subclass UGraspComponent either in C++ or Blueprint.
Override PostGiveGraspAbility() to respond to the ability being granted or PreClearGraspAbility() to respond to the ability being removed.
There is also PostGiveCommonGraspAbility() if you require it. PostGiveGraspAbility() will not trigger off granting common abilities.
Ability Sets
You don't have to continue using the UGraspData::GraspAbility if you have added ability sets. Override UGraspData::GetGraspAbility() and return index 0 of your ability set.
[!CAUTION] The ability is used as a TMap key and you should never change what is returning here during runtime There will be unintended consequences if you do, as this is not supported