Skip to content

Strange velocity calculation in shape_cast::cast_shape() #423

Description

@Kyzzsa

pub fn cast_shapes(
pos1: &Pose,
vel1: Vector,
g1: &dyn Shape,
pos2: &Pose,
vel2: Vector,
g2: &dyn Shape,
options: ShapeCastOptions,
) -> Result<Option<ShapeCastHit>, Unsupported> {
let pos12 = pos1.inv_mul(pos2);
let vel12 = pos1.rotation.inverse() * vel2 - vel1;
DefaultQueryDispatcher.cast_shapes(&pos12, vel12, g1, g2, options)
}

I think the difference of velocities should be with parenthesis like below

let vel12 = pos1.rotation.inverse() * (vel2 - vel1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions