How to move around an object with Physics?

Hello. I want a player to be able to move around an object, so I tried attaching it to the player’s actor. This works fine, except physics has to be disabled, which seems to disable collisions. How would I go about this without disabling collisions?

Check out physics constraints:

If you need it to also affect the players ability to turn/move, that would require a custom movement component, which is a whole different matter :slight_smile:

Forgive me if I’m missing something, I just started with unreal engine a couple days ago. How would I create a Physics Constraint during gameplay? I have found how to make one that exists at the start of the game, but this is not what I want. I would also like to be able to use an object already in the game world, instead of having to create another one.

This is how I got my pawn to pick up objects while still having physics enabled. I poked around in the content examples physics level and adapted the mechanics used there for my own blueprint. There’s some extra stuff there that’s not really necessary. The trace hits PhysicsBody type objects, the rest should be clear enough.

OK, just to make sure, since mine isn’t working. Physics handle is a physics handle component, Physics Object is an object variable, and Object Types is an EObjectTypeQuery array with a default element of “Physics Body,” correct?

EDIT: Nevermind, that was strange. Even after restarting, my new input keybinds didn’t work. I had to eject control then possess the player again and it worked fine. Thanks for the help!

What are the values of the variables?

The default values of the variables are:
PhysicsHandleActive = false …
HandleDistance = 200.0 …
ObjectTypes = PhysicsBody …
PhysicsHandle = None

The rest are either set in the blueprint before being used or unnecessary (like the currentmovespeed)

Thanks man!

I can’t find physics body in the group thing

You need to add a new element with the + symbol and then pick PhysicsBody from the list that drops down.

What type of group is it? My computer is dis colored.

Nevermind! I read the earlier comment.

My character doesn’t have Max or current walk speed.

Wait. He does, but I can’t set the value.

How would you make this blueprint work across two separate clients?

Use The AddPhysicsConstrain Component Node:

https://docs.unrealengine.com/latest/INT/BlueprintAPI/AddComponent/Physics/AddPhysicsConstraintComponent/index.html