From 0732b0cd287b2ef99a2f3a1774a3a0a167efdbf3 Mon Sep 17 00:00:00 2001 From: D8H Date: Fri, 22 Mar 2024 02:38:18 +0100 Subject: [PATCH] [Reviewed] [Sticker] Fix object positions after a size change when angle is 0 (#1232) --- extensions/reviewed/Sticker.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/extensions/reviewed/Sticker.json b/extensions/reviewed/Sticker.json index a33dba9c4..da8c0d055 100644 --- a/extensions/reviewed/Sticker.json +++ b/extensions/reviewed/Sticker.json @@ -8,7 +8,7 @@ "name": "Sticker", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sticker-outline.svg", "shortDescription": "Make objects follow the position and rotation of the object they are stuck to.", - "version": "0.5.0", + "version": "0.5.1", "description": [ "This extension can be useful to:", "* Stick accessories to moving objects", @@ -240,9 +240,9 @@ " basisObject.getY() + this.relativeY);", " }", " } else {", - " object.setPosition(", - " basisObject.getX() + this.relativeRotatedX * basisObject.getWidth(),", - " basisObject.getY() + this.relativeRotatedY * basisObject.getHeight());", + " object.setCenterPositionInScene(", + " basisObject.getCenterXInScene() + this.relativeRotatedX * basisObject.getWidth(),", + " basisObject.getCenterYInScene() + this.relativeRotatedY * basisObject.getHeight());", " }", " } else {", " object.setAngle(basisObject.getAngle() + this.relativeAngle);", @@ -597,7 +597,6 @@ "description": "", "group": "", "extraInformation": [], - "hidden": false, "name": "OnlyFollowPosition" }, { @@ -607,7 +606,6 @@ "description": "", "group": "", "extraInformation": [], - "hidden": false, "name": "IsDestroyedWithParent" } ],