Skip to content

Commit c58b295

Browse files
committed
Added positionToCamera method (but still needs fixing)
1 parent e194b95 commit c58b295

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

v3/src/input/Pointer.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ var Pointer = new Class({
6767
this.justMoved = false;
6868
},
6969

70+
positionToCamera: function (camera, output)
71+
{
72+
if (output === undefined) { output = { x: 0, y: 0 }; }
73+
74+
return camera.screenToCamera(this.position.x, this.position.y, output);
75+
},
76+
7077
x: {
7178

7279
get: function ()

0 commit comments

Comments
 (0)