Set object in front of camera in ar

I want to make perspective like fps game in ar using webxr.

Is there any way to fix object in camera view?

I tried

var pLocal = new THREE.Vector3( 0, 0, -2 );
var target = pLocal.applyMatrix4( camera.matrixWorld );							
gun.position.copy( target );

but it didn’t work


gun.position.set(camera.position.x, camera.position.y, camera.position.z);

didn’t work too

how can I fix object in front of camera in webxr?