Download

Odd behavior for picking up an object and letting go

I want to implement a simple push/pull mechanic. so i decided to go for the player being able to pick up a Crate and then move left/right with it (side scroller).

it works when no physics is involved, i approach the object press a key, do a trace, then attach the object to the pawn, let go of the key and the object is detached.

now i want it that, when you let go, the object falls to the floor.
so i have bp called Crate, which has a component of static mesh Cube, and “Simulate Physics” turned on.
the level starts, the crate falls, i run over, pick it up and then let it go.
but when i try to pick it up again, it doesnt attach itself to the player - but all my blueprints appear to fire correctly (using simulation/break points etc…)

when i pick up the Crate I have to set Actor Enable Collision to false, so i can move around with it (not sure if this is correct, but without setting this it would block me).
so when I let go I set this back to true, detach the object, but still cant pick it up

the problem seems to be when I “let go” of the Crate, and set its children components back to Set Simulate Physics (true) - so it falls to the ground - i cant pick it up, if i dont do this, and leave the crate floating in midair, i can go and pick it up as many times as I want

im pretty confused and looking for any pointers at all

cheers

can you try make your root component the one do physic simulation? that usually is the way to solve my problem, and may simplify your bp as well(no need to get child component.)

ok i will give that a go, but ive noticed with my mesh as the root component, i cant seem to move/scale it :S

that totally worked…