Rotating a Grabbed Object

I know this thing has already been asked but it hasn’t gotten a clear answer and it has just been forgotten. I am making a grab system and I want to be able to rotate the object like in this video: UE4 - Witanlore - Manipulate Physics Objects (Grab, Rotate, Drop, Use) - YouTube . I am having trouble doing this. Please help me figure out how. Currently I have something like in this tutorial : Unreal Engine 4 Tutorial - Pickup and Drop Objects (Physics Handle) - YouTube but I switched “Grab Component at Location” for “Grab Component at Location With Rotation” to prevent my object spinning. Please help me get this working, Thanks! :smiley:

I the way I do this in my game:

  • My Player has a SceneComponent called HeldObjectLocation placed where the player should hold the object.
  • On Pickup, I set the rotation of HeldObjectLocation to the same rotation as the object I’m picking up.

  • On Tick I call this custom event below (could be a function). This updates the physics handle to orient the desired location and rotation for the attached object.

This should be enough for you to be able to pickup objects with their current rotation and maintain that relative rotation as you turn (which is even more than the featured video is able to do). To add more rotation with key inputs, set up those bindings, and simply add the rotation to the HeldObjectLocation SceneComponent, when the keys are pressed and you are holding an object.

1 Like

Thanks! It worked great!

Wow, Thanks so much. It took me ages to search the internet for that solution! :wink:

Thank you. Helped me here too.

Can anyone share the blueprint of solution? as I am new to unreal so its difficult for me to understand.

This is all very clearly explained above, I suggest reading the documentation and watching tutorials to become further familiarized with Unreal Engine.