Physics Constraint Between Character And Physics Object

I want to have the default third person character grab a physics-simulated cube.

After the relevant traces, I spawn a Physics Constraint Actor at - a scene component within - my character, attach said Actor to - said scene component in - my character, and then Set Constrained Components (1, the cube; 2, a primitive component within my character.)

I expected this to create a physics constraint that parents to my character, and then creates a constraint towards the cube, so it’d kinda drag along if the character moved away.

However, the result is that the moment the “Set Constrained Components” node processes, the constraint actor moves to 0, 0, 0, along with the cube, which is following properly.

Why is my constraint moving to 0, 0, 0, and how do I make it stay at its relative location to my character? Alternatively, is there a better workflow for getting a character using the Movement Component to “grab” physics objects?

Thanks!

Nevermind - solved.

Turns out, the constraint’s absolute location will be Component 2’s relative location. Therefore, component 2 must be the root component of its actor to have the physics constrain not move when setting the constrained components. I simply changed Component 2 to the Capsule and now it behaves properly.

2 Likes

Hey Lord Defi.

i was wondering of this logic is the same or similar to this on https://www.youtube.com/watch?v=lkxsWSXnFdI&ab_channel=stevenbelcher

i want to achieve the same effect in the video, i think its a Physics Constraint that attached to the character. but i cant seems to understand how to do it.
if so would you please share any information if you have thank you.

Hey Abdalah.Salameh
I’ve been trying to figure this out for a couple of days now. I got an answer from the person in the youtube video but I don’t seem to understand it properly. Perhaps you understand it?
His comment was
“Hey. I have all the logic going on on the handle itself. It’s a cube connect by a contraint with physics forces. The character then follows the cube. I then turn on some collsion to represent the players position. I didnt actually use any ik as all the animations were based around holding the handles anyways.”

1 Like

oh man i wish i can understand it, it seems simple yet complicated at same time!
cant he make a tut about it? it would be much helpful.

if you find out the solution please tell me about it. :slight_smile:

Is what you were trying to achieve something similar to Abdalah’s post? Like in this video https://www.youtube.com/watch?v=lkxsWSXnFdI&ab_channel=stevenbelcher