Want custom FP player to be able to pick up, move and drop object under a certain weight?

HI there,

I simply want my First Person Character to be able to pick up, move and drop objects. I would also like to be able to define only certain objects can be picked up so I thought maybe the best way was to define that only objects under a certain weight can be picked up. If there was a way I could rather just add a sort of “tag” to my chosen objects that would even be better.

So to give oyu background on my situation. I’m new to unreal engine. I’m practicing by slowly building up a first person game. So far I’ve created a FP character that can move and jump. Now I want to introduce this object pick up feature so that I can add a bit of interactivity to the experience.

So basically I am asking if someone could me with figuring out this blueprint or direct me to a simple step-by-step tutorial that could show me how I could achieve this?

This is how my character blueprint looks so far:

Try this tutorial A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

Then set a branch with a condition of getting the objects mass and if its mass is less then or equal to a mass of your choosing, branch it to true. I would probably add the branch before setting the Physics Handle Active.

Thanks for the response!

The tutorial seems like what I want except I don’t need the gravity gun impulse feature. Just want to pick up and move objects.

I’ve followed the instructions so far and I’m stuck at a point where I see there are connection boxes with maths symbols (x, +, -). I’m not sure how you create these boxes? What exactly are they?

Try dragging off the pin that goes to it type add, subtract, multiply, or divide and make sure it’s of the right type, int or float most likely. If there’s one that says ABS that absolute.

If dragging the pin out doesn’t show it for whatever reason just right click on the blueprint and type add, subtract, etc.

Also, to get those, you can just put in, + or -. As well as the >, <, >=, <=, or == symbols.

Ah awesome, thanks a bunch! I seem to be getting the hang of it!

Haven’t had the chance to fully check it out yet so if I’m stuck again I’ll let you know.

Seriously appreciate all the help!

To change the position when it’s picked up change the x, y, and z values where you set the physics handle.

I’m not sure without mocking it up in blueprint but if you’re having a problem with distance try removing the middle mouse up and down increasing and decreasing the pick up distance variable and just hard set it to something you feel works best for you.

I may need to make that a bit clearer. Don’t remove the variable itself, just don’t let the mouse wheel change it.

ok so got everything to work. Can pick up object and I am able to define only object under a certain weight.

My problem now is that when I pick up an object it hovers quite a bit above my crosshair. How can I set it that it always stays in line with my crosshair?

Also would like to keep object at the same distance from player after picked up. At the moment it seems it jumps to a certain position (one quite far away from the player as well). Is there a way to set this?

Thanks!

Got it figured out. This is great, learning loads. Thanks for the help once again!

Hey

I posted another question earlier today and it hasn’t been answered yet. Could you take a look and see if you can give me some advice?

Here’s the link