mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added pointer locking and viewport moving
This commit is contained in:
parent
072e984215
commit
6d9d02615a
12 changed files with 236 additions and 141 deletions
|
|
@ -80,8 +80,9 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
centerPosition.x += Settings.STAGE_WIDTH / 2;
|
||||
centerPosition.y += Settings.STAGE_HEIGHT / 2;
|
||||
|
||||
centerPosition.x -= this.me.playerController.xyInput.x * Settings.STAGE_WIDTH / 4;
|
||||
centerPosition.y += this.me.playerController.xyInput.y * Settings.STAGE_HEIGHT / 4;
|
||||
var lookAt = this.me.getLookAt();
|
||||
centerPosition.x -= lookAt.x * Settings.STAGE_WIDTH / 4;
|
||||
centerPosition.y += lookAt.y * Settings.STAGE_HEIGHT / 4;
|
||||
|
||||
return centerPosition;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue