Skip to content

Commit 2f46f9d

Browse files
committed
keepInFence should also use the tight bounding box.
1 parent 90559de commit 2f46f9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Sprite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ export class Sprite extends SpriteBase {
634634
keepInFence(newX, newY) {
635635
// https://github.com/LLK/scratch-vm/blob/develop/src/sprites/rendered-target.js#L949
636636
const fence = this.stage.fence;
637-
const bounds = this._project.renderer.getBoundingBox(this);
637+
const bounds = this._project.renderer.getTightBoundingBox(this);
638638
bounds.left += newX - this.x;
639639
bounds.right += newX - this.x;
640640
bounds.top += newY - this.y;

0 commit comments

Comments
 (0)