if there's no this.controls.target(), game.playerPosition() returns false, yet all the methods that use game.playerPosition() ignore this possibility, thus, if you don't set up an object to control, the engine becomes unhappy.
This gives the engine a sensible default in lieu of a real player position (the game.camera.position).
if there's no
this.controls.target()
,game.playerPosition()
returnsfalse
, yet all the methods that usegame.playerPosition()
ignore this possibility, thus, if you don't set up an object to control, the engine becomes unhappy.This gives the engine a sensible default in lieu of a real player position (the
game.camera.position
).