Skip to content

Commit 8ff84eb

Browse files
committed
keepInFence should also use the tight bounding box.
1 parent 084b00d commit 8ff84eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Sprite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ export class Sprite extends SpriteBase {
509509
keepInFence(newX, newY) {
510510
// https://github.com/LLK/scratch-vm/blob/develop/src/sprites/rendered-target.js#L949
511511
const fence = this.stage.fence;
512-
const bounds = this._project.renderer.getBoundingBox(this);
512+
const bounds = this._project.renderer.getTightBoundingBox(this);
513513
bounds.left += newX - this.x;
514514
bounds.right += newX - this.x;
515515
bounds.top += newY - this.y;

0 commit comments

Comments
 (0)