Thread
C
1y ago
Mouse input outside the canvas
If I have a small character illustration on a page in a React site where I want the eyes to follow the mouse anywhere on the page. Is there a way to pass in the mouse position to the listener for outside the canvas? Sorry if this is super basic, but I'm an animator and not a web dev, and I cant find any documentation about it!
1 reply
2mo ago
There is! You will need to export the name of the target group you are using to align the eyes and then use Javascript for that.
You can see an example from Pedro here: https://github.com/pedroalpera/rive-followmouse-outside-canvas