Skip to content

Allow mocking inputs for Gamepad #16221

@Shatur

Description

@Shatur

What problem does this solve or what need does it fill?

After #15685 it became inconvenient to mock inputs. On 0.14 we could call set_pressed or set. But these methods are no longer exposed.

It's still possible to do this by sending events, but it's inconsistent with the rest of the input and not very ergonomic.

What solution would you like?

I would like to bring back set_pressed and set.

Additional context

There is a similar issue regardless gamepad creation that predates the gamepads rework: #4911. Could be solved by adding a constructor for Gamepad component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreC-UsabilityA targeted quality-of-life change that makes Bevy easier to useP-RegressionFunctionality that used to work but no longer does. Add a test for this!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions