Skip to content

Commit 40b325a

Browse files
committed
A Camera will pause following a Game Object for the duration of the Camera Pan Effect, as the two will clash over the Camera scroll position
1 parent f9482ef commit 40b325a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Notes:
146146
* The `Key` method signature has changed. It now expects to receive a reference to the KeyboardPlugin instance that is creating the Key as the first argument. This is now stored in the new `Key.plugin` property, and cleared in `destroy`.
147147
* `KeyboardPlugin.removeKey` has a new optional argument `destroy` that will, if set, destroy the Key object being removed from the plugin.
148148
* `InteractiveObject.customHitArea` is a new property that records if the hitArea for the Interactive Object was created based on texture size (false), or a custom shape (true)
149+
* A Camera will pause following a Game Object for the duration of the Camera Pan Effect, as the two will clash over the Camera scroll position (thanks fruitbatinshades).
149150

150151
### Bug Fixes
151152

src/cameras/2d/Camera.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ var Camera = new Class({
712712
CenterOn(deadzone, this.midPoint.x, this.midPoint.y);
713713
}
714714

715-
if (follow)
715+
if (follow && !this.panEffect.isRunning)
716716
{
717717
var fx = (follow.x - this.followOffset.x);
718718
var fy = (follow.y - this.followOffset.y);

0 commit comments

Comments
 (0)