Skip to content

[3.5] Input -> "Get Controller [Motion Sensor]" and "Set Controller [Motion Sensor]" function for GDScript #21

@halotroop2288

Description

@halotroop2288
Vector3 get_joy_gravity(int p_device);
Vector3 get_joy_accelerometer(int p_device);
Vector3 get_joy_magnetometer(int p_device);
Vector3 get_joy_gyroscope(int p_device);


Vector3 set_joy_gravity(int p_device, const Vector3 &p_gravity);
Vector3 set_joy_accelerometer(int p_device, const Vector3 &p_accel);
Vector3 set_joy_magnetometer(int p_device, const Vector3 &p_magnetometer);
Vector3 set_joy_gyroscope(int p_device, const Vector3 &p_gyroscope);
  • By default, these functions should return the same as the "Get [Motion Sensor]" functions that already exist.
  • For platforms that support multiple devices with motion sensors (such as PS3, PS4, PS5, and Switch), These functions should return the motion data provided by the individual controller.

Progress

  • Fallback implementation
  • Switch implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions