mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Merge pull request #2904 from embair/patch-1
Clarification of fixedToCamera semantics
This commit is contained in:
commit
f3f6c98896
1 changed files with 2 additions and 3 deletions
|
@ -37,7 +37,8 @@ Phaser.Component.FixedToCamera.prototype = {
|
|||
_fixedToCamera: false,
|
||||
|
||||
/**
|
||||
* A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.
|
||||
* A Game Object that is "fixed" to the camera is rendered at a given x/y offsets from the top left of the camera. The offsets
|
||||
* are stored in the `cameraOffset` property, which is initialized with the current object coordinates.
|
||||
*
|
||||
* The values are adjusted at the rendering stage, overriding the Game Objects actual world position.
|
||||
*
|
||||
|
@ -45,8 +46,6 @@ Phaser.Component.FixedToCamera.prototype = {
|
|||
* the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times
|
||||
* regardless where in the world the camera is.
|
||||
*
|
||||
* The offsets are stored in the `cameraOffset` property.
|
||||
*
|
||||
* Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.
|
||||
*
|
||||
* Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.
|
||||
|
|
Loading…
Add table
Reference in a new issue