Hello all,
I’m trying to have a Cube with this Blueprint on it grab itself up on an Interact event, I watched this tutorial: https://www.youtube.com/watch?v=k6oKBVRaLLo already, but somehow I can not substitute the “hit” of the LineTrace for the “self” so the Cube is picked up.
Please make the mesh the root component and use the mesh component directly instead of “self”
In simple terms, your use of “self” in the actor graph means that you directly pass the actor as a variable to the node, but what the node requires is a “primitive component”
Actor and primitive components are not the same object
The main purpose of setting the static mesh as the root component is for the normal operation of the physical simulation.
Alright. I understand how I could make it work. But how could I make an ActorComponent then, that does the “GrabComponentatLocationwithRotation” on itself, as I don’t want all my logic on the root for the sake of modularity and reusability?
For example I want the component “GrabbableObject” that I can just put on any object I want players to be able to carry.
For modularity, you can write your logic anywhere, even create a uobject object, you only need to get the object reference, this does not affect
For example, when you are performing an operation, you create an actor object. This actor object is used to handle your various physical operations. When your operation is finished, just destroy the actor. It only obtains the object reference when working, and when it ends the work Destroy, which includes any logic you want to modularize