I have a piece of code that creates a Cognite3DViewer instance, load a few models and get them reacting to clicks, not very different to this basic example in the docs. When I set the DefaultNodeAppearance to Ghosted, however, the result of await viewer.getIntersectionFromPixel(event.offsetX, event.offsetY) is always null. Other options behave as expected.
Is this behavior intentional? I didn't find anywhere in the docs pointing that it is.
Below is what I believe is the relevant part of the code:
This is currently intended behaviour from our side to enable clicking "through" ghosted nodes. I'll add a task for us internally to make this clear in the docs.
I have a piece of code that creates a Cognite3DViewer instance, load a few models and get them reacting to clicks, not very different to this basic example in the docs. When I set the
DefaultNodeAppearance
toGhosted
, however, the result ofawait viewer.getIntersectionFromPixel(event.offsetX, event.offsetY)
is alwaysnull
. Other options behave as expected.Is this behavior intentional? I didn't find anywhere in the docs pointing that it is.
Below is what I believe is the relevant part of the code:
I'm using
@cognite/sdk v8.3.0
,@cognite/reveal v4.14.1
and@three v0.164.1