Getting your object coordinates is super important if you want to move, teleport object and much more. Here’s a step by step guide to getting your coordinates.


Select your object


Set your Trigger

Decide what will trigger the behavior. In this case, we are using “Interaction” so the behavior will be triggered when the player interacts with the object.


Create a Variable

Create a variable that you will use to pass the coordinates position. To do that, tap on the “Variables” icon on the top-left corner of the screen and create a “Position” variable. Name it so you can retrieve the variable later. Let’s name it “Pos”.


Build Your Custom Graph

Now, tap on the position of that block and tap “Add Custom Graph”.This custom graph will be responsible for picking the coordinates you want and pass those coordinates to the variable. Select the Operator tab and find the “Object Position” node in the property extractor. Link it to the “Position” node. In the Sources tab, select “This Object” in the Self category. Link it to the “Get Position” node.


Display coordinates in text

Let’s now display the coordinates that the variable has for the player. Go to the “Effects” section and select ‘Text on HUD with Variable’. Attach that new block and set its variable to “Pos”. Here, we also changed the text that comes before (’Text Before’).



Exit the Behavior Editor, playtest and check that the coordinates are displayed when you interact with the object