Skip to content
Discussion options

You must be logged in to vote

Hi, good question. The colliders have set:

            collider.set_friction_combine_rule(CoefficientCombineRule::Min);
            collider.set_restitution_combine_rule(CoefficientCombineRule::Sum);

As per docs: https://rapier.rs/docs/user_guides/rust/collider_restitution/, and looking in code also of rapier:

impl CoefficientCombineRule {
    pub(crate) fn combine(
        coeff1: Real,
        coeff2: Real,
        rule_value1: CoefficientCombineRule,
        rule_value2: CoefficientCombineRule,
    ) -> Real {
        let effective_rule = rule_value1.max(rule_value2);

        match effective_rule {
            CoefficientCombineRule::Average => (coeff1 + coeff2) / 2.0,
            Coe…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Ughuuu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants