Skip to content

Remove aggregate.body.disableSync from XR Controllers#18001

Merged
sebavan merged 1 commit intoBabylonJS:masterfrom
yuripourre:yuripourre-disable-sync
Mar 2, 2026
Merged

Remove aggregate.body.disableSync from XR Controllers#18001
sebavan merged 1 commit intoBabylonJS:masterfrom
yuripourre:yuripourre-disable-sync

Conversation

@yuripourre
Copy link
Contributor

@yuripourre yuripourre commented Mar 2, 2026

Removes

aggregate.body.disableSync = true;

It was introduced in an attempt to improve performance. It works well on emulators but break on real devices.

Can be tested in this playground: https://playground.babylonjs.com/#YN4F0X#1

CC: @docEdub

Copilot AI review requested due to automatic review settings March 2, 2026 02:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the disableSync optimization from v2 physics bodies created for XR controllers to restore correct behavior on real XR devices (where disabling sync caused breakage).

Changes:

  • Removed aggregate.body.disableSync = true when creating controller physics aggregates (v2).
  • Kept controller bodies as PhysicsMotionType.ANIMATED, allowing normal sync behavior to proceed.

Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I ll let @RaananW or @CedricGuillemet validate.

@sebavan
Copy link
Member

sebavan commented Mar 2, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 2, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting for @CedricGuillemet

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 2, 2026

Snapshot stored with reference name:
refs/pull/18001/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18001/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18001/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/18001/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18001/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18001/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18001/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/18001/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 2, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 2, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 2, 2026

@sebavan sebavan merged commit 81782dd into BabylonJS:master Mar 2, 2026
24 of 25 checks passed
@yuripourre yuripourre deleted the yuripourre-disable-sync branch March 3, 2026 01:46
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.

5 participants