game rules - object triggers set up

This commit is contained in:
2025-11-13 09:17:18 +02:00
parent 2a1423877b
commit c8e501ff6e
9 changed files with 98 additions and 20 deletions
+2 -2
View File
@@ -57,8 +57,8 @@ function autoScale(object, mk = 1) {
function centerOrigin(object){
let result = new Group();
let bb = getBoundingBox(object);
let position = getBoundingBoxCenterPoint(bb, object.position).negate();
result.userData.bbox = getBoundingBox(object);
let position = getBoundingBoxCenterPoint(result.userData.bbox, object.position).negate();
object.position.copy(position)
result.add(object);
return result;