With a Physics shape attached, I understand that the collider gets the scale baked in. But why is the scale component then removed?
I just want to shrink my items to 0 scale, I no longer care about the collider, however it seems I must manually add the scale back on after the conversion process. In my case I do this along with the collision that triggers the shrinking, however it’s seems a bit odd, it feels like I am going about it the wrong way, although it does work. I wonder how I get the items original scale (for now this doesn’t matter, my items are all scale 1).
1 Like
I have the same odd conversion result. Did you find the cause?
Currently, Physics only cares about Translation and Rotation for performance and assumes that colliders are non-mutable. Better support for scaling colliders post creation is on the roadmap, and the current ‘5b. Change Collider Size’ demo in the samples is also adding a Scale component during conversion.
For clarity, in your usecase, setting scale to 0 is removing the rigidbody body from the simulation altogether?
No. When I add a physics shape, it the scale component gets removed during ConvertToEntity. I have to add it back on after conversion. I imagine it’s the physics conversion process removing it, probably because it uses the scale and bakes the collider, any further alterations to scale won’t adjust the collider so it removes the scale component. In my case that is acceptable, I want to just scale the rendered side of things after a collision, a cheap disappearing animation.
1 Like