New bug/feature of 4.12, when you play in editor, eject and select your actor, than toggle any bool flag in inspector actors body got reset. It’s mass is reset. Simply it is reconstructed as a new object, and I am not sure if other components are reconstructed too. Looks strange, because why need to reconstruct already constructed object?
It rewirtes or preconfigured object data. Even data changed in inspector is overwritten.
You mentioned physics asset. Are you seeing this behavior with a Skeletal Mesh?
But yes, changing any of the bools under the Details panel during runtime will cause the mesh to be reinitialized. So seeing a jump in the physics (or reset) is normal.
As far as calculating the Center of Mass, what specifics are you looking for? When not in PIE, you can see a green sphere visualizer in the Editor Viewport that shows exactly where the center of mass is located.
Yep, this behavior noticed for skeletal mesh. For center of mass - i have not checked if it is reset with the component.
Actually this behavior is not a problem for a packed project, but in editor it makes some troubles while debugging. Is there any function which can handle that event and reinitialize component? also interesting if such behavior can be expected for some other components.
Hm, rerunning constructors on already created actors looks a little bit strange, why anybody need this. What about current state of the actor variables? If my actor is in the middle of executing some sequence, than just checking some debug bools will completely reset it?
Yep, I understand, but that makes no sense to me, if i’d want to restart sequence, i’ll add some button to restart it manually, but if i don’t want to I have no option now. And I see no logic in reconstructing the object after switching some flag, completely unexpected behavior.
On the other hand, If i’d be using constructor scripts, and if creating some child actors in them, now i need to make sure the old one are deleted somehow. While in final version of game i don;t need to care about this, because all objects are created a new.
Maybe there is the reason for reconstructing objects, but for now it sounds like only adding problems.