daily pastebin goal
59%
SHARE
TWEET

Superpowers: get mouse position

ShadowTzu Apr 24th, 2015 (edited) 245 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function mousePosition(camera: Sup.Camera) {
  2.         var mouse = Sup.Input.getMousePosition();
  3.         mouse.x = mouse.x * camera.getOrthographicScale() * 0.5 * camera.getWidthToHeightRatio();
  4.         mouse.y = mouse.y * camera.getOrthographicScale() * 0.5;
  5.         return mouse;
  6. }
RAW Paste Data
Top