Prevent Actor From Moving When Rotating?

I’m this issue where I need to be able to rotate my objects by 90 degrees in either Yaw, Pitch or Roll axises.

It works nice and all, but the issue is that whenever I modify it’s Pitch or Roll rotation, it gets misplaced, it’ll move downwards by “half a block”. I know I can fix this by just doing some math, but I wanted to check here first if there’s a convenient way to prevent this from happening? I’d rather not have to modify the vector by a certain value for each block every time it’s rotated.

I hope that makes sense, if not, I can record a short clip :rolleyes:


And a second question, what would be a good way to save creations? For example I put down a few blocks and then I can save this and later load it into the world? First thing that comes up to mind is saving all the spawned objects into an Array. But how would I go about saving these arrays to later load them?

Look at pivots of those objects, they always are center of rotation. To rotate around another location, you need do some vector math.

I tried to center the pivot of the object, I found out that the center of the grid in 3ds Max is where the pivot will be in UE4 - but that didn’t help, it still moved around. I guess I’ve just got to deal with it :stuck_out_tongue:

Pivot is the first thing that came to mind for me as well, but it’s hard to tell without some visuals.

If pivots are the problem, you can make the object a child of an empty scene component and line up the actor so that its centre is where the scene component is, then rotate the scene component instead of the actor.

I recorded a short little clip of what’s happening when I’m rotating it;

Could I possibly fix this using sockets on my StaticMeshes? Or would this be bad practice when building larger things?

Yup, definitely a pivot thing. Either set the object’s center at the world origin or use a scene component to proxy like I said above. Or do the vector math :stuck_out_tongue:

Super cool project btw