Unlock Player.VRDevice

http://wiki.roblox.com/index.php?title=API:Class/Player/VRDevice

For gamepad controllers, the mapping is roughly the same for Xbox One/360 vs PS4/PS3. So it doesn’t really make sense to let the developer know which kind of controller it is.

As a developer, I can only recognize that someone is using VR, but not which VR device they’re currently using. Because of this, I can only offer suitable controls for either the Vive OR the Rift. Not both.

As shown above, the Rift controllers have far more buttons which are used in different behaviors than the Vive controllers.

14 Likes

The property seems to be in a placeholder state.
I checked its value with my Vive activated, and its always just an empty string.
Regardless, it should probably be an Enum instead of a string.

cc @0xBAADF00D

It should be an enum and it would probably make more sense for this to be a property on VRService instead of the player object.

4 Likes

Since (regular) scripts can’t use it, and corescripts (probably) don’t use it (as it’s just a placeholder), might as well get rid of it and move it to VRService

1 Like

It’s meant to replicate to the server for analytics purposes.

I agree with the original post. It’d be nice to be able to access this because the controllers really aren’t interchangeable. It’s something to think about; there might be a more abstract and futureproof way.

2 Likes

Wouldn’t this make more sense as a property or method on UserInputService?

1 Like

Start making the distinction between the controller and the headset if you’re aiming for futureproof. It’s only a matter of time before we start seeing third-party VR controllers.

Putting this under the UIS seems logical.

Hiding the controller type is counterproductive. I don’t want to tell a Dualshock user to press Y during a tutorial.

3 Likes

Would be much appreciated, and developers should definitely be able to support multiple controller types. Before I got an XBox controller, I always had to fumble around looking for equivalent keys on my PS3 controller when prompted to press xyz button.

1 Like

Almost CERTAIN that if Roblox really is coming to PS4, they will be forced to have this, considering the Sony-Microsoft feud.
I doubt Sony wants to see xbox-controls on their platform.

But we have the VRService?

Can’t you just use this to check if the button is available?

78dd8c2edb65b3933dcd8119fa439bb8.png

No, PS4 doesn’t/wouldn’t have unique button keycodes

But doesn’t it use shapes?

The layout is similar enough to Xbox that there’s no need for a separate API.
X maps to Square, Y to Triangle, B to circle, etc.

1 Like

Hmm, oh well then.