Limitations - Vaei/Grasp GitHub Wiki

Polymorphism Woes

[!TIP] There is only one limitation with Grasp known at this time. Or rather, a limitation inherited from Unreal Engine.

Grasp wants to provide a USphereComponent, UBoxComponent, and other derived UPrimitiveComponent types as well for you to use as Graspable Components. But to do this it would need to be able to insert itself between UPrimitiveComponent and USphereComponent, or rebuild the entirety of these components, neither of which are either achievable or reasonable.

Grasp gets around this engine limitation by providing IGraspableComponent as a unified base, and making use of Grasp Developer Settings to apply the common collision settings, and using UGraspStatics to share common functionality.

This is not a major limitation, but what it means for you, is that if you subclassed one of the provided components, e.g. UGraspableBoxComponent for specific functionality, that UGraspableBoxComponent will never become a sphere unless you also subclass the UGraspableSphereComponent and re-add the same functionality, and of course the components will not share a unified parent that you can cast to other than UPrimitiveComponent.

So instead, you should use interfaces in the same way

[!NOTE] You will probably never need to subclass these components anyway