How to change the pivot point of static mesh using c++?
Hi there, so basically question is in the title. Can anybody tell me how to do that using c++ as I created static mesh using c++ and pivot point is on the bottom of the object and I want it be in the middle. Thank you
asked Apr 20 '17 at 02:03 PM in C++ Programming
The problem is the mesh that you are using, since they made it with the pivot on the bottom, so it's fairly simple, just get the static mesh component on that actor and move it by half it's height.
I'm not near my computer but you can do something like this (If you are inside the actor we are talking about):
As I said I'm not near my PC so I cannot test this, but GetBounds() should give you the width, height and depth of the mesh, just adjust the location of it and you will have the pivot in the center.
Follow this question
Once you sign in you will be able to subscribe for any updates here