How can I implement hover highlight before picking?

I want to implement picking entities from a scene, but have the scene outline the entity on mouseover, then on click add to a selection set (and highlight). I’ve worked out how to do these things independently, but not all together.

It’s almost like I want two selection managers?

Hello @zak,

The geometry of the HandleOperator is highlighted during a mouse move (hover) operation. As a helpful reference, we provide the source code as part of the Communicator package which you can find in the directory HOOPS_Communicator_2024.7.0\web_viewer\deprecated\typescript\operators\HandleOperator.ts.

The function of interest is:

public async onMouseMove(event: Event.MouseInputEvent): Promise<void> {
            super.onMouseMove(event);

            if (this._draggingHandle && this._activeHandleNodeId !== null) {
                this._onHandleDrag();
            } else {
                // If we are not dragging, highlight the handles as we mouse over them.
                const selection = await this._viewer.view.pickFromPoint(
                    event.getPosition(),
                    this._pickConfig,
                );
                await this._highlightHandle(selection);
            }
        }

Thanks,
Tino

Thanks Tino,

So if I understand correctly there is no way to have multiple selection managers, and so I must effectively implement my own and colour the model manually?

A Web Viewer object only has one selection manager so you won’t be able to create multiple SelectionManager objects assigned to a Web Viewer.