Skip to content

The delta of pointer-missed events is always zero #852

@AntoninRousset

Description

@AntoninRousset

Describe the bug

The delta property of the pointer-missed is always zero (obvious in the code).

I have a project where object of the scene can be selected by clicking on them. To unselect the user can press where there is no object, which I implemented using the pointer-missed event on the Trescanvas. However, objects get also unselected when the user uses the mouse to drag the camera around. To prevent this I wanted to rely on the delta of the pointer-missed event, to discard events with dragging.

Reproduction

https://github.com/Tresjs/tres/blob/main/src/composables/useRaycaster/index.ts#L137-L139

Steps to reproduce

No response

System Info

No response

Used Package Manager

pnpm

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions