- Home /
Is the child collider still static even if I parent them with a rigidbody ?
Hi,
I know that every moving collider object should have also a rigidbody. Is this rule valid for colliders parented by a rigidbody ? Or do they become somehow dynamic colliders ?
What if I need additional colliders as child objects under the rigidbody? Say, they are not kinematic, they don't even have a rigidbody. Only the parent is rigidbody.
Does the parent rigidbody make the children colliders dynamic or are they still static ?(which is weird, the static colliders parented by a moving rigidbody, loosing too much performance)
The engine have to recalculate the structure when moving static colliders. I wonder if it's still doing this for compound colliders or not.
Comment converted to answer so it can be accepted as such.
Answer by iwaldrop · Apr 17, 2013 at 05:09 AM
No, it's not. The the rigidbody aggregates all of the colliders under it at runtime. Plus, colliders with rigidbodies aren't considered static colliders, and the table doesn't include them for the reason of having to recalculate the entire collision matrix every time one is moved, as you noted.
It is safe to have several colliders childed to a single rigidbody, and to only move objects with colliders that also have rigidbodies attached.
Excellent question!
What if some of its child static colliders get moved. Is it consider as 'moving static collider'?
You didn't define 'it'. But FWIW there's no such thing as a 'static' collider that is childed somewhere beneath a rigidbody.
Sure there is, that's the definition of a Compound Collider isn't it? But I'm not sure of the answer to paraself's question either.
Answer by koirat · Sep 01, 2018 at 10:38 AM
Still no answer after so many years, I'm allowing myself to rephrase the question.
Is adding or moving colliders being part of a compound collider attached to single rigidbody incur additional performance drop.
Your answer
Follow this Question
Related Questions
Having a kinematic rigidbody detect collision with a collider without a rigidbody 7 Answers
Unity creating static colliders 1 Answer
Controll squeeze of rigidbody between static collider and kinematic rigidbody. 1 Answer
Enemy Cube going through walls. 1 Answer
Collision detection with pooled objects 0 Answers