Picking up object makes movement inputs not work properly

First of all, I am new to UE5 so sorry if my blueprints are nonsensical! I created a basic press “E” to pickup object system. However, when I pick up the object the WASD inputs start moving the character in random directions. I suspect it is some sort of collision or clipping issue however it may be my blueprints.
This is my E to pickup object blueprint…


And this is my pickup event…

Is there something that I should change in my blueprints? Or is it more likely a collision problem?

Hey there
You’re teleporting the item you detach from the player to the root of the item you’re attaching to the player, so it will be on the way when the player tries to move if it has collisions. If you don’t want that item anymore you can just Destroy Actor.
Also, the item you attach can block the player if it has collisions as well and it gets in the middle of the capsule.

If you don’t want to destroy the items, you can make them have no collisions that affects the player, only the channel for your Line Trace, in this case Visibility. Then you can change the collisions on Pick Up.

Thanks for the response!
I’m not sure what you mean by not wanting the item anymore but what I want is that the item picked up is destroyed, and then becomes held in the players hand.
It seems from what you’ve said that the second option would fit me better, how would I go about doing this?

Well, if your item doesn’t need collisions at all, you can simply create a collision Profile that ignores all channels except for Visibility. You can do so through Project Settings → Engine → Collision
In there find Preset drop down and add New… with your custom settings.
Something like

If your item needs collisions once it’s picked up, you can either destroy the Pick Up item and spawn another one that’s actually usable and that has other collisions, or you can change the collision Profile.
image
The only thing with this approach is that you have to change the collision for all components in the actor (the ones that need collision changed) individually.

You can find out more in this video:

I created a profile exactly the same as you showed and added it in like so…


The issue still persists despite this

Nevermind!! I realise I added it into the component rather than the actor! Now that I linked it to the actor the clipping has stopped.


For anyone with a similar issue this is how my code looks with GRIM_Warlock’s suggested advice.
Thanks a lot!!

1 Like