Unsure how to accses Joypad/controler Gyroscope and Accelerometer values

Godot Version

v4.1.1

Issue

I’ve been wanting to recreate the rub tilting effect from “Super Rub A Dub” the ps3 game. Unfortunatelty im unsure how to get the Gyro and Accel values since there isn’t anything in Input or input maping .

I have the DS4 driver instaled and i can get controler inputs working fine but can’t find any tutorials for controler motion controls leaving me stumped on what i should even do.

TLDR:

don’t know how to get gyroscope/accelerometer values and not sure what to do.

hoping for a responce :>

I’m also looking for support in this.

You could be looking for this. Assuming Godot is recognizing your input device and that device has an accelerometer compatible with Godot.

Quoth the docs:

Note: This method only works on Android and iOS. On other platforms, it always returns Vector3.ZERO.

That said, I imagine the accelerometer values might be available as raw axis values, at least on something like a PlayStation controller. You’d have to stitch them together yourself, but my advice would be, explore what axis values the gamepad offers, you may find the accelerometers/gyro near the end of the list.

1 Like