How to account for different objects on pick up and rotation

Hi, I am currently working on a project where my character will need to be able to pick up and hold multiple objects in a socket on the skeletal mesh. Currently I have one item that attaches and is rotated fine on the socket since that is the mesh I used to make the socket.

The problem comes in where I have different items that need a different orientation upon pickup and I am not sure how to go about rotating them specifically. Each item for pickup has a blueprint and I assume each items rotation needs to go in that blueprint but I am not sure what event to start it with.

Pick up item blueprint in BP_ThirdPersonCharacter:

Would it be better to move the pick up item blueprint nodes in to each items blueprint to account for the different rotations?

Example item BP with nothing in the event graph:

Any advice would be appreciated, thanks!

As you’re picking up blueprints, you have a lot of scope.

Two ways off the top of my head

  1. Set up each blueprint so you don’t have to think about it, they all use the same rotation, and the object is rotated within the blueprint to compensate.

  2. Talk to them with blueprint interfaces. On BPI function, could be a request to return the object rotation needed to pickup the item.

Thanks for your response! When you say each blueprint do you mean each items blueprint? That wouldn’t be bad as I won’t have that many items in my game. I also can’t seem to find any examples of what I am looking for, if you know of any that would be great.

I assume in each items blueprint I would need to pass in that the specific item is being held and rotate it based on that?

You just construct the blueprint so that it will be in the correct orientation when mounted on the player socket in the same rotation as the rest.

IE, if it was a gun and in the default orientation is was facing upward instead of forwards, then just rotate the gun mesh in the BP.

Thank you! Didn’t realize it was that simple in the end. It is working as expected now.

1 Like