Intended Behaviour
I pickup physics actors and attach them to my player with a Physics Constraint, and I want to be able to set a rotation based on a per actor setting.
No matter the angle I pick-up the object should align to a specific fixed rotation. Example from Hydroneer, the bed always point forwards:
I have this vertical mesh which has the pivot point at the bottom, and when picking up, I want it to be straight pointing forward (90, 0, 0) - (I set this screenshot manually):
Then this tool, I want it to be straight (0, 0, 0):
Problem
The problem is I can’t find a way to get them to the rotation to be set to a specific rotation.
When I pickup, the rotation is the current one that the object is on.
Examples:
Attached to the bottom pivot point, but it’s pointing backwards because this is how it was laid down on the ground, and this is how it was relative to the camera:
Upside down:
Setup
Player Components:
Picking up (based on this video):
Physics Constraint:
What I have tried
- Set World Rotation and Set Relative Rotation for the picked up component, nothing happens
- Set World Rotation of the
HeldObjectSlot
, the attached object just rotates around together with theHeldObjectSlot
component.
Questions
- How to set the Relative rotation of the grabbed component in relation to the
HeldObjectSlot
/ or constraint or whatever in order to achieve what I described?