Center of a Mass BP nodes are a mess

I call this a bug because it hardly makes sense.

The Set Center Of Mass node will offset it based on the PhysX calculated center. Now the stupid issue here is that there is no way to get the PhysX calculated center. The Get Center of Mass node will NOT return that PhysX calculated center and instead any center that is currently set. So it does not work to set the center to a world location more then once because once Set has been used the Get is useless.

A possible workaround could be to store the PhysX calculated center somewhere before doing any Set. This is a problem though when you need to make use of it for any component. Not to mention that every developer will stumble over this issue. Also, why is the Get a world location while the Set is a offset?

Hello,

The behavior of Get/Set Center of mass has been updated in later engine versions. Please let us know if you see the same behavior in 4.14 or 4.15.

As a note, what you are referring to as the workaround is the intended workflow. If an INT has a default value of 10 and then you were to set the INT to a value of 25 and then get the INT, you would get a value of 25. You could only get a value of 10 before you set it to something else.

Additionally, the Get gets the object’s center, what the Set is doing is taking the current center and then offsetting it by the amount you enter in.