4.1 is ALMOST there

We will push the button tomorrow at 10am PST :slight_smile:

I CAN’T WAIT TO SHARE THE VIDEO that @PirateJC built with the community content

I’m also UTTERLY excited by the demo that @PatrickRyan created using NME

See you in 24h team!!

12 Likes

Wooot! Now it’s time for some last-minute bug fixes (if any). Release countdown:

5 Likes

I noticed an issue with Gamepad button indexing in preview VS cdn.

Button mapping is off.

Woo hoo! That’s 4am Australian Eastern Standard Time so I’ll have to get up early :wink:

1 Like

Can you repro?

Adding @Drigax to check

Pinging our resident input expert @PolygonalSun

@Michael_Prosser how are you seeing this issue? Is there a PG you can share that demonstrates this? What gamepad are you using specifically?

1 Like

Hey @Michael_Prosser,
@PolygonalSun and I looked into the gamepad behavior, but we’re not quite seeing any issues.

We have a simple testing scene via: https://playground.babylonjs.com/#U3XJTB#38

It appears to recognize the Xbox360, XB1 and PS4 controllers accurately. If you have any more details, we can take a closer look.

Hi - your example seems to work. I was using the button indexes to create actions.

https://playground.babylonjs.com/#U3XJTB#39

Line 50 outputs the button index to console but some buttons are not firing anything. They used to and do on CDN.

1 Like

Hey @Michael_Prosser,

So here’s what I believe is going on. In our gamepad implementation, there are a couple of things happening. First, we have our gamepad inputs broken into a few different types, buttons, D-pad, Triggers, and joysticks. When you use the buttons, you get access to the bumper buttons (eg. L1, R1), the face buttons like Cross and Square, and the joystick press buttons (eg. L3 and R3). They’re also broken into an order that supports this setup. Because of this, the button indices won’t match up with the ones that you’d find with the Gamepad Web API.

Furthermore, since we’ve separated these buttons up, using the onButtonDownObservable will get you those buttons and onPadDownObservable will get you the d-pad buttons. The triggers work off of onlefttriggerchanged and onrighttriggerchanged.

For the time being, I’ve pushed up some code to get all of the buttons (except for the triggers) to display their standard value, as per the Gamepad Web API but the context that you refer to them will still be important (onPadDownObservable for D-Pad, onButtonDownObservable for everything else).

Just out of curiosity, what gamepad were you working with when you found this?

1 Like

I can adapt to use this method instead. It was a PS4 controller

Thank You

2 Likes