Raylib-cs icon indicating copy to clipboard operation
Raylib-cs copied to clipboard

[Core] Gamepad axis is not correct.

Open Shadowblitz16 opened this issue 3 years ago • 0 comments

Before submitting a new issue, please verify and check:

  • [x] The issue is specific to Raylib-cs and not raylib
  • [x] I checked there is no similar issue already reported
  • [x] My code has no errors or misuse of Raylib-cs

Issue description

GetGamepadAxisMovement() does not returns correct values. It seem trying to print a object or move it around only lets it move 8 ways not 360...

Environment

OS: KDE neon 5.25 Processors: 16 x AMD Ryzen 7 5700G with Radeon Graphics Graphics Procceser: AMD RENOIR

Issue screenshot

Na

Code example

    protected override void OnUpdate()
    {
        base.OnUpdate();
        //Physics.VX = (Input["Right"].GetValue(0.25f) - Input["Left"].GetValue(0.25f)) * Speed;
        //Physics.VY = (Input["Down" ].GetValue(0.25f) - Input["Up"  ].GetValue(0.25f)) * Speed;
        //Console.WriteLine("VX:"+Physics.VX);

        Physics.VX = Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_X);
        Physics.VY = Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_Y);
    }
    protected override void OnUpdate()
    {
        base.OnUpdate();

        Console.WriteLine
        (
            "AXIS X:"+Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_X) + ", "+
            "AXIS Y:"+Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_Y)
        );
    }

Shadowblitz16 avatar Sep 25 '22 01:09 Shadowblitz16