Skip to content

World/Local mismatch in documentation/behavior of shape casts. #933

Description

@Yrgh

The documentation, both in the user guides and in parry, says that the witness1 and normal1 fields of the result of a shape cast are in the local space of the first shape (the collided-with collider), however a look at source code in parry and manual testing shows this is not true, and that witness1 and normal1 are in world space when they reach the user. This applies similarly to witness2 and normal2. Either the documentation is wrong, or there is missing logic.

This can be reproduced by placing a cuboid rotated 90deg around the Z-axis and shapecasting in the negative-X direction. When the shapecast hits, the expected result of normal1 should be approximately [0, -1, 0], as it is hitting the local bottom face, however my results have shown it to be approximately [1, 0, 0], which is the normal in world space, not the local space of the cuboid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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