Skip to content

Can I move an object in the canvas along with the mouse? #1514

@ghost

Description

According to the title,I want to move an 3d object in the canvas though a matrix using a move method.But the question is when I push the delta value,which is calculated by the newClientX substracting the lastClientX of event.clientX,as a parameter to the translate method,it can not match the Coordinate system of the webgl in the canvas.Because the mouse's position on the website uses pixels,so when I move the mouse a little,the object in the canvas will move so fast.Is there any method to fix the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions