Is there a way to use an object's center point in condition

I’m adjusting mouse control of the Geometry Monster example.
It compares the mouse location with the object’s origin in my guess.
So it creates a slightly awkward movement.
I’d like to use an object’s center point in event condition instead.
I don’t want to make hard-coding using the object’s width.

If you’re looking for the horizontal center, I believe the expression is ObjectName.PointX(“center”), for vertical center, it’s ObjectName.PointY(“center”).

1 Like

ObjectName.PointX(“center”) doesn’t seem to work in my demo. Please refer to the below screenshots

Monster.PointX(“Centre”) worked! It’s the “Centre”, not the “Center”.

Refer to the below link.

“Center” should now work too. I just forgot it is case sensitive (that’s my post you’re linking too. :smiley: )

1 Like