Physics colliders don't scale with parent nor entity


While using the physics colliders in PlayCanvas (for setting up triggers), I noticed they don鈥檛 scale with the entity they are attached to. Nor do they scale with the parent entities. Which can make them pretty difficult to work with.

I assuming this is just something that鈥檚 been overlooked? Would be rly neat if they scaled the same way the rest of the entities and render components scale at least :slight_smile:

I鈥檓 afraid that primitive colliders do not support scaling from the Entity (either from the Entity it is attached to or parents). It鈥檚 not so much as overlooked as it wasn鈥檛 designed to support that from the outset.

Would it be possible to add that functionality?

Maybe. It would have to be done in a way that doesn鈥檛 break existing projects. The other issues is that the colliders size cannot be changed at runtime due to the constraints of Ammo. Resizing the collider at runtime means destroying it and recreating the body again in the physics world.

ah. ic

perhaps it could be an optional feature that is by default off?

For instance it could be
"Size update:

  • fixed
  • on initialization
  • real-time"

or something similar?

Potentially. Can you submit a feature request please here: Issues 路 playcanvas/engine 路 GitHub

will do!

Can be found here: Scaling physics colliders with entity and parents 路 Issue #5089 路 playcanvas/engine 路 GitHub