Labels don't respect x y coordinates based on object location

Tried to make text labels attach to a question and answer field, and the buttons behave, but the labels move around if the object is moved, even when I try to define where they should appear based on where the object is.

I guess I could try to make a separate object with the label in it, and then attach that object to this one? Or is label location somehow not part of the game world at all?

The label location follows the location on the screen/user interface, not the game world.

1 Like

Ah that is very inconvenient, since it’s the only way to display text from a text block, right?

2 Likes

I tried that but it didn’t seem to work in this case (or I somehow applied it wrong). If I moved the object to a new position in the editor, everything would be in a random place again.

You have to get the values of the camera to update the label’s position to a world object.

image

2 Likes

Yep, did exactly this. Put the camera part in the question field and added the field and button labels accordingly. Was fine until I moved the object a bit…

Well if you do it again, I can take a look at it.
Your game currently doesn’t use camera or labels, so I can’t help with this.

Here’s another example that I use label tracking heavily, I also used label tracking in several games.
Flowlab Game Creator - Bundle Library

2 Likes