Set child position to the parent center of mass?

I have a rocket ship mesh and I want to attach a PhysicsThrusterComponent to the exact center of mass. I’ve tried a couple of approaches with mixed results

  1. In the Components section of the blueprint editor I can see the green sphere that represents the center of mass of the mesh. I can use this to approximately place the thruster in the correct position, but there is room for error.
  2. There is a GetCenterOfMass blueprint function, but that gives me (0,0,0). This is presumably local coordinates, relative to the center of the mesh itself, not a value that could be used to set an exact position for a child object.

I’m currently using method (1) which mostly works, but it’s not super accurate. Any slight offset will inherently cause the rocket to veer.

Is there some way I can snap the thruster to the exact center of mass of the rocket mesh? Perhaps I can use the value returned by GetCenterOfMass and convert it to a value that the child object can use, like some kind of LocalToWorld transform?

You can use Get Center of Mass function in construction script to set the location of the thruster. I had the same issue with thrusters in earlier versions but now it just works since 4.6 with the help of that node. You can see my result here: Physics Thrusters Test with a Colonial Viper - UE4 - YouTube

It has 6 thrusters, one located exactly at the center of mass that makes the ship move forward and backward.

Thanks again, Jacky. I had actually tried this before, but I must have wired up the construction script wrong because I didn’t work at that time. Second time is the charm! For anyone else who reads this, this is what my working construction script looks like: