Skip to content

Implement the methods of RapierContext on RapierContextItem instead #677

@idanarye

Description

@idanarye

RapierContext has various methods that can be used to query the simulated world. Problem is - you never actually get a value (or even reference) of the type RapierContext. Bevy queries don't return the item itself - instead they return its QueryData::Item. In our case - it's RapierContextItem, which is generated automatically by the #[derive(query::QueryData)] and does not have any of these methods, making them unusable.

If these methods were implemented on RapierContextItem instead of RapierContext (which should be doable even if RapierContextItem itself is generated by a macro) then Query<&RapierContext> would be usable (currently it isn't)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions