game rules - object triggers set up
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user