Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

What is the mathematical explanation behind this implementation of simulating eyeballs roll in eyes?

$
0
0
I want to simulate eyeballs roll in eyes and I have found and forked this implementation in codepen.io. This is exactly what I need. Smart way but I don't understand why it needs to work like this way. Why is it using `ratioX` and `ratioY` which are calculated from dividing `mouseX` and `mouseY` with their sum? Is there a simpler or even cleverer way to do similar simulation?

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>