Skip to content

Numeric expressions in controller mapping JSON #1947

@ada-tv

Description

@ada-tv

Controller mapping JSONs (ie openxr.json, openvr.json) currently can't express numeric expressions, only boolean ones. This actually caused a few problems in the past I had to fix by removing the bad checks*, and it currently makes expressions like this impossible:

if (
  !OpenXR.LeftHasPrimary &&
  OpenXR.LeftTrackpadX > -0.4 &&
  OpenXR.LeftTrackpadX < 0.4
) {
  Standard.LeftPrimaryThumb = OpenXR.LeftTrackpadPress
}

*Where a controller axis was false <= 0 and true > 0, which made weird direction-specific control bugs, and was probably intended to have an abs in there somewhere but never got one

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions