Create hotspot front of camera

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);

2 Likes