Trying to pick up an object without line trace, cast to primitive component failed

As far as i know the graph works right up until the point i have to cast the objects physics handle to a primitive component (grab component only accepts primitive components for its component) i just dont understand why the cast is failing. the method is run once on click.

Get is functioning correctly as far as i am aware it is obtaining the correct physics handle :slight_smile: What is nullptr?

what if GET returns nullptr?

You need to get a reference to the object you want to grab with your physics handle. What you do there is that you try to make the physics handle itself the object it would grab with very same physics handle - in other words your physics handle would grab itself if that somehow worked (it will not). You can probably see why that doesn’t work for you.

Why don’t you want to use linetrace like on the tutorial you are following?

I already have a reference to the object (Object focused) debugging proves it obtains the correct physics handle, i would just like to know why i cant cast that to a primitive to plug into the grab component node.

Im not using a line trace because i already have the object i wish to grab dynamically selected at the point the grab function is run.

You can’t cast physics handle to primitive component, they don’t have the same base type and it makes no sense for you to do that.

Since you already have object reference, you should try to get primitive component from that (instead of it’s physics handle) for component to grab.

The only reason i was doing that was because the input suggested it required a primitive component, yet get component can only grab the physics handle? is this not the case?

You can use get component for any component class that’s in your actor / pawn. On your image, you’ve just selected Physics Handle as Component Class on that get node, but you can try to get other component classes by changing that value.

i see what youre saying, will give it a go tomorrow