#How to scale Entities with Colliders?
1 messages · Page 1 of 1 (latest)
Hi, I am running into a similar issue, I have a prefab which has a collider as a child. I am currently trying to use the PostTransformScale component, keep an eye on my thread, maybe our solutions are similar aswell :) https://discord.com/channels/489222168727519232/1085908932297510932
In my case there are no children involved. Just a singular entity with a collider on it. But will keep an eye on both.
Just to update incase anyone else stumbles on this question. It seems to me the answer is that you need to
- Grab the
PhysicsCollidercomponent on your Entity - Grab the
ColliderPtrfrom that component. - Find out what type of Collider it is (capsule, sphere, mesh, etc.)
- After you find out what type of Collider it is, do something like this
CapsuleGeometry geometry = capsuleCollider->Geometry;```
4. Write your own method that scales that specific collider type properly.
5. Apply your new Geometry to the `PhysicsCollider` via the same pointer
This requires wrapping your code in unsafe
Unless someone can prove otherwise, I have seen no other more convenient way to do this.
Just be careful as unless you tick the, make unique box, this will scale all entities with the same collider