Autodesk ForgeViewer: Snapper Function Fails with Overlaid Models Depending on Load Order

77 Views Asked by At

I am facing an issue with the Autodesk Forge Viewer's v7.87 snapper functionality when dealing with two overlaid models on top of eachother.

  • The snapper works as expected when I follow a specific sequence: first loading Model id: 1, then Model id: 2. In this scenario, the snapper interacts correctly with both models.

  • Conversely, if I reverse the loading order, starting with Model id: 2 and subsequently loading Model id: 1, the snapper fails to function. It seems to be unable to recognize Model id: 2 at all and every hitTest returns Model id: 2 no matter what I hover or click.

example

Scenario 1 (Working):

When I load Model id: 1 first and then Model id: 2, the snapper functions correctly.

snap

Scenario 2 (Not Working):

However, if I load Model id: 2 first and then Model id: 1, the snapper does not work.

no snap

Is there a workaround or a solution to ensure the snapper works regardless of the model loading order? Any insights or suggestions are greatly appreciated!

0

There are 0 best solutions below