Hi all! For my game I'm trying to do physics simulation with rigidbodies which can be resized during gameplay. To do that I created a subclass of KActor and I'm changing their size using SetDrawScale3D().
I change the size gradually inside Tick() to get smooth results and I was hoping that would also help with the physics as a sudden size change obviously cannot work for physical reasons.
The visual result is now very pleasing with objects slowing growing to reach twice their size. However it appears the internal physics simulation just does not update at all - the large objects still behave like they'd have their original size and weight.
I tried multiple things: SetCollisionSize (does not help as KActor does not seem to use a collision cylinder), Re-Init physics by InitRBPhys(); on the object (makes no difference), ForceUpdateComponents() ... nothing helped.
The only thing that partially works is reattaching the Mesh with StaticMeshComponent.SetStaticMesh() after changing the DrawScale3D. However this leads to errors in the log I don't really understand:
Another problem with reattaching the Mesh is that is resets the physics state which is not what I want and I loose all the restraints. I could recreate that stuff, but reattaching the Mesh also seems a waste of processing power.
[0224.69] Log: WARNING: Cooking Convex For Actor: UEDPIESP_Test.TheWorld:PersistentLevel.BY2_KActor_12 Component: StaticMeshComponent_1 StaticMesh: Adis_testpackage.static_meshes.testblock (Scale: 2.800000 4.274292 4.274292) Please go and set PreCachedPhysScale on the mesh to have this scale for RunTime spawned objects
I hope there is some better solution. Has anyone achieved what I'm trying to do here? Any help would be greatly appreciated.