Create hotspot front of camera


I working in on babylon js, I have load module. I want to add hotspot in front of camera. so how I create hotspot front of camera.

I am get camera current position. but not get camera angle.

Please hlep me

Do you ask how to let TransformNode/Mesh stay (move & rotate with) infront of camera?


Or how to link 2D (= irrelevant rotation) GUI Text and TransformNode/Mesh?


1 Like

If you want to demonstrate camera rotation by a TransformNode/Mesh:


you can get for example a point in front of the camera with a given distance (here 5 unit).

let myVector3FrontCamera = camera.getFrontPosition(5);

Then create your hotsptot on this point.

mesh.position = new BABYLON.Vector3(myVector3FrontCamera.x, myVector3FrontCamera.y, myVector3FrontCamera.z);

The topic of hotspots is extensively discussed in this tutorial series so it’s a good resource too 3D for E-Commerce - Custom Experience | Babylon.js Documentation (

thank you,

This solution working perfectly