Short version: I need to change the pivot point of a ‘proceduralmesh component’ in c++ or in blueprint. (not in a 3D designer/ not in the viewport). Thx!
How can I set the pivot point (override the original) in blueprint? (UE4.18)
Is there a direct blueprint function? Like ‘SetPivotPoint’?
I only found workarounds on the forum…and none of them where usefull for my case.
I’m trying to make furniture doors rotate: I import a .obj file with a room and I create proceduralmeshcomponents of the furniture. All meshes take the pivot point of the room. I seperatly added the pivot points in c++. Now I’m stuck because I can’t set those pivot points to the proceduralmeshcomponents. I hoped I could do that in blueprint…
Update: How can I set the origin or pivot point in c++ for my proceduralmeshcomponents?
The only block that seems to return the actual location of my proceduralmesh is “GetWorldTransform” (in blueprint). Is there any way to get this block in c++ for my proceduralmesh? I could then set the pivot point or origin point with these “GetWorldTransform-value’s”?
Add a SceneComponent to your BP, and place the pivoting mesh as a child as this component. You can pivot the SceneComponent now to rotate your mesh using that point.
My ‘proceduralmesh’ that i’m trying to rotate, is allready a child of an actor. Also I’m working in my characterpawn event graph to make the selected ‘proceduralmesh’ to rotate. I can add a ‘add scene component block’ but I don’t see how I can make the mesh child of the scene component.
I did that, but I don’t seem to be able to give the parent the right location. It always stays in the origin no matter what worldlocation/actorlocation I tried to set. The proceduralmesh has to stay on it’s original place and it has to get its real world location. I’m running out of a strategy to manage that.
It has been a while but I found how to set an origin. I created an actor, made my “myproceduralmesh” child of an actor. Then added a “Movement Component” to that actor. Apperently the “Movement Component” has a pivot point. That let me to my final solution of rotating the mesh.