Skip to content

Fix DynamicRayCastVehicleController forward axis setter name - #1085

Open
Shridhar-dev wants to merge 1 commit into
dimforge:masterfrom
Shridhar-dev:fix-index-forward-axis-setter
Open

Shridhar-dev wants to merge 1 commit into
dimforge:masterfrom
Shridhar-dev:fix-index-forward-axis-setter

Conversation

@Shridhar-dev

Copy link
Copy Markdown

Fixes the DynamicRayCastVehicleController forward axis setter being misnamed.

The getter was declared as get indexForwardAxis() but the setter as set setIndexForwardAxis(axis). Since TypeScript treats these as two separate accessors, indexForwardAxis was read-only and the setter was only reachable as controller.setIndexForwardAxis = n. This is inconsistent with indexUpAxis, which has a getter and setter under the same name. controller.indexForwardAxis = n was a type error.

Fix by renaming the setter to indexForwardAxis so it pairs with its getter.

This is a breaking change for anyone using controller.setIndexForwardAxis = n. I can keep a deprecated alias if you prefer.

Tested by building the compat packages and checking with a script that vehicle.indexForwardAxis = n sets and reads back the value, and that the old name no longer type-checks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant