Prowl icon indicating copy to clipboard operation
Prowl copied to clipboard

[Standalone] InputAction.ReadValue<T> not returning casted value

Open PaperPrototype opened this issue 2 months ago • 1 comments

Describe the bug I connected a ps4 controller to try and fly around in the Audio Demo and it throws the following error when I hold UP or DOWN in the joystick:

An exception occurred during the Update loop:
System.InvalidCastException: Invalid cast from 'System.Single' to 'Prowl.Vector.Double2'.
   at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
   at Prowl.Runtime.InputAction.ReadValue[T]() in /Users/abdiellopez/Developer/Prowl.Standalone.Preview/Prowl.Runtime/InputManagement/InputAction.cs:line 182
   at AudioDemo.AudioDemoGame.HandleCameraInput() in /Users/abdiellopez/Developer/Prowl.Standalone.Preview/Samples/AudioDemo/Program.cs:line 407
   at AudioDemo.AudioDemoGame.BeginUpdate() in /Users/abdiellopez/Developer/Prowl.Standalone.Preview/Samples/AudioDemo/Program.cs:line 356
   at Prowl.Runtime.Game.<>c__DisplayClass10_0.<Run>b__1(Double delta) in /Users/abdiellopez/Developer/Prowl.Standalone.Preview/Prowl.Runtime/Game.cs:line 71

Holding joystick UP or DOWN results in a value of 1

Image

If I let go of the left joystick (stop giving it UP or DOWN left joystick input) then the value goes back to being a vector

Image

To Reproduce Run the audio demo and try controlling the camera with a ps4 controller.

Expected behavior Wee fun game

Screenshots see above

Additional context idk wat to put here

PaperPrototype avatar Oct 20 '25 04:10 PaperPrototype

Also BTW the audio demo sounds so nice ❤️ you can hear the sounds in 3D yeee

PaperPrototype avatar Oct 20 '25 04:10 PaperPrototype