Skip to content

Commit 42c75c0

Browse files
committed
Updated jsdocs to mention roundPixels (phaserjs#1377)
1 parent 9c71afb commit 42c75c0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/core/Camera.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ Phaser.Camera.prototype = {
158158
},
159159

160160
/**
161-
* Tells this camera which sprite to follow.
161+
* Tell the camera which sprite to follow.
162+
*
163+
* If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position.
164+
* This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.
165+
*
162166
* @method Phaser.Camera#follow
163167
* @param {Phaser.Sprite|Phaser.Image|Phaser.Text} target - The object you want the camera to track. Set to null to not follow anything.
164168
* @param {number} [style] - Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow().

0 commit comments

Comments
 (0)