Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17075

How to get mouse down coordinates in local space

$
0
0

I am using Cocos Creator 3

I have a sprite on the screen. I am getting mouse down location with following;

this.node.on(Node.EventType.MOUSE_DOWN, (event: EventMouse) => {

            console.log(event);

        });

It seems like these are global coordinates.
Is there a way to get them in local coordinates ?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 17075

Trending Articles