Have a problem with showing coordinate data with GUI

Hello everyone

I have problem to show the coordinate in rectangular info. when I wanted to get the coordinate and show it in rect info I got an error which said that this.text.split is not a function.

here is my code:

var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
var rectInfo = new BABYLON.GUI.Rectangle();
rectInfo.width = 0.2;
rectInfo.height = "40px";
rectInfo.cornerRadius = 5;
rectInfo.color = "black";
rectInfo.thickness = 1;
rectInfo.background = "white";
rectInfo.left = "38%";
rectInfo.top = "-44%";
advancedTexture.addControl(rectInfo);

var labelPos = new BABYLON.GUI.TextBlock();
rectInfo.addControl(labelPos);

  scene.onPointerObservable.add((evt, pickInfo) => {
if (evt.pickInfo.hit) {
  camera.setTarget(evt.pickInfo.pickedPoint);
  console.log("G", evt.pickInfo.pickedPoint);
 // impact.position = evt.pickInfo.pickedPoint;
  impact.position = new BABYLON.Vector3(evt.pickInfo.pickedPoint.x,evt.pickInfo.pickedPoint.y +20,evt.pickInfo.pickedPoint.z);
  labelPos.text = evt.pickInfo.pickedPoint.toString   
}
  }, BABYLON.PointerEventTypes.POINTERDOUBLETAP);

here is my PG: https://playground.babylonjs.com/#XB49NT#8

Hey @Arash_Bagheri

Can you help us understand a little more about what you’re trying to achieve?

In your playground, when I click around, I see the console logging working? I’m not seeing the error your describing.

If you could provide a little more info about the problem that would be helpful.

Cool scene btw!

Hey @PirateJC
Thank you so much for answering to my question. :pray:
sorry for my mistake, here is my updated PG: https://playground.babylonjs.com/#XB49NT#8

I want to show the location of ‘impact’ in the rectangular info, i mean when you double click on the arbitrary point of the height map, you put the impact on that position, and then I want to show that location on the rectangular info.