How to creating a compound collider with child colliders of different scales by code

CompoundCollider.Create can only create colliders without child scale. I want to achieve this by modifying the source code. Spheres, boxes, capsules, and cylinders are relatively easy to handle since I only need to modify the Radius, Size, or Height. But what if the child is a mesh collider or another compound collider?

1 Like

We are rolling out a new feature very soon that will let you apply a transformation including uniform and non-uniform scale and even shear to any collider type at runtime. That should solve your issue.

This feature will be available in an upcoming release. Stay tuned!

5 Likes

I’m very excited about this.

I also have a question to ask. I have a compound entity whose collider is composed of colliders from entities A, B, and C merged together. After merging, I removed the PhysicsWorldIndex from EntityA, B, and C. I want to continue applying the PhysicsVelocity.Linear of EntityA or B or C to the compound entity.

How can I achieve this?

I am happy to help with this. But I suggest you ask this in a seperate post in the forum so that people that have the same question can find the answer, and to invite others that might know the answer to contribute.

You can share the link to the new question here then.

Thanks, here is the new quesiton

1 Like

@daniel-holz any ETA for that release? I am trying to decide if I should switch to not using compound colliders for some stuff in my game or wait for this to be available.

Unfortunately we can’t provide a specific timeline just yet, but it will come sooner rather than later.