Download

Picking up Physics objects and moving them.

Hello all!

I am super new to UE4, so I am trying to figure out how I can have a player interact with an object in the world. By interact I mean pick up the object, move it around and then drop it again. I have looked into the Tutorials regarding trace nodes in order to know if I am aiming at something that can be interacted with, by they usually end up being linked to turning on/off lights or changing colors. If it matters, it will be in a third person view and just moving a simple cube around would be a massive start.

Can anyone give me some advice on where I get started.

My brain is rubbish at programming, since I am a but more design orientated. I have to learn a different process when it comes to the Blueprint feature in UE4.

Thanks all!

Take a look at https://www.unrealengine.com/blog/new-blueprint-tutorials - that should get you started with more advanced blueprints.

As far as implementing object pick up, I would start by tracing forward from the character and getting the vector between the character and the object on pick up. Then, at each event tick, set the object location to the character location plus that offset vector. When you drop the object, stop setting the location.

E.g. If the character location is (4,5,1) the object is at (5,5,1), and the character is facing along the positive x axis, then the offset vector is (1,0,0). Each tick will set the object to the actor location + (1,0,0) in the character’s forward direction until the player drops the object.

Hope this helps!

Hi Raide,

To achieve what you want, you need a Blueprint with Physics Constraints. Here i have a example that does what you want. Download: https://db.tt/eIduT4yH

Thanks both! I will look into your suggestions and see how I get on. :smiley:

There is a handy component called a ‘Physics Handle’ which you can use for ‘grabbing’ physics objects. I think we actually have an example of that in the physics Content Example map, but I don’t have the engine in front of me right now I’m afraid.

Now that sounds good. I have really not checked trough the example maps yet.

In the early stages of UE4, I am trying to figure things out without starting from a pre-made base. Mainly so I can know why I am putting things in the Blueprint and what they end up doing. :smiley:

Hi all there…
Is there any way to accomplish this type of task using Leap Motion, I’m newbie & started to learn UE4.
Using Getnaom Plugin I have done moving character by gestures but how to select and pick the object using LeapMotion Hand.
I’m trying with official Plugin also but there is more Gesture in BluePrint.
Kind give some Reference or Big Lecture I’m totally collapsed on this task by using LeapMotion.

Same problem…