"...has to have 'Physics Enabled' if you'd like to GetMass" not true!

Well, I’m not even sure what the bug is really. It’s either the warning or it’s that we’re not supposed to be getting GetMass from an unenabled physics object. Even without enabling physics on a static mesh object, you can GetMass just fine, even edited ones.

Steps to reproduce:

  1. New blank project
  2. Create an Actor BP
  3. Add and make a Static Mesh Component the root
  4. Add a static mesh to the SMC
  5. Go to the Event Graph
  6. On Begin play, GetMass
  7. Use a print string to get that value
  8. (Notice I did not enable physics)
  9. Value of GetMass is displayed and the warning occurs
  10. Go back to the bp
  11. Enable physics
  12. Warning goes away

Edit values if you want. Same results with or without enabling physics.

To be honest, I don’t see a reason why we couldn’t get the mass from any object, especially if the mass is in outer space… But that’s another dilemma.

Hello VictorBurgos,

I was able to reproduce the behavior you described and have sent this to our development team to look into. You can follow this ticket at the link below:

Please let us know if you have any further issues.

Thanks, Tyler

Thanks for the response!

I’m running into this same thing in 2023. I see the issue has been marked resolved as Won’t Fix but there’s no explanation as to why. Is it safe to ignore this warning or is there another way to get the mass/com? I’m making a game where I need to do calculations based on the Mass and Center of Mass without physics being simulated. The reason is the component I need the mass/CoM for is being added as a child to another component which has simulated physics enabled. If they all have simulated physics then they are not welded together. I tried briefly enabling physics, getting the mass/com, then disabling it which makes the warning go away but it also doesn’t seem to disable the simulation if you disable immediately after enabling it.

My current solution is to save the mass/com in a file but it’s annoying to have to do this whenever I add a new component rather than just reading the calculated value.

There’s a function to calculate mass under UPrimitiveComponent but it’s not exposed to blueprints. You can create a function library and wrap the function in an exposed function.