I have created a component, inherited from UActorComponent, which I can add to Actors in the Blueprint editor.
However I need my component to be able to do the following:
- Receive “Hit” collision events from the root component
- Alter the collision geometry based on some processing
- Alter the rendered geometry based on some processing
Having come from the world of Unity this is relatively simple to do. Add a member function OnCollisionEnter() and then get the collision & rendered geometry components (GetComponent(), GetComponent()) update everything and off I go.
In UDK I can’t see how, from my component, I can get access to the ROOT COMPONENT, in order to get the rendered geometry & the collision geometry (convex hull).
I also can’t seem to get access to the collision events that occur. I have tried overriding ReceiveHit but setting a break point, this never gets hit.
So I guess there are 2 ways I do this in a UDK friendly way:
- Inherit from UActor, create my own derived class with my extra functionality, and manipulate things that way
or
- Have some sort of pointer in my component which is hooked up, pointed to, the root component
The thing is I want things to be as simple as possible for content editors. I simply want them to drop the component onto their actor and things to then work without further input from them.
So I guess how do I get access the hit events, the root component, and it’s collision & rendered geometry from a component? Is this even possible the way I am going?