I have a cube that can be picked up and has one side that faces the player.
I want to be able to rotate it left/right/up/down so that I can have one of the other sides face the player.
I thought this would be as simple as adding or subtracting 90 on the yaw and roll values.
On the first turn this works well but then it effects the cube as if you were looking at the original side.
So if you rotate the front side to be on the top and then press left/right then you are still looking at the same side but the other sides have rotated around it.
Hello,
I haven’t try, this is only an idea on the fly but if you use another component (like a collision box) as orientation reference and apply selected rotation to your cube, it would be ok. Or using actor rotation and rotate only component.
Edit : I did a try to be sure : With a “get actor rotation” / “combine rotators” + 90 (for both pitch and yaw)/ set world rotation to component. And it may be what you want.
I wrote it in the edit in the last post : You do a “get actor rotation” or a “get world rotation” of your box if you use a box then add rotation with -90 / +90 for yaw or pitch and then set world rotation to your mesh. (You can add a move component for rolling effect, you’ll just need to get mesh location and set it in the component move)