I'll like to attach my object on my camera or camera target.
I try with crosshair.parent = camera;
and this but doesn't work:
//Crosshair
var crosshair = new THREE.Mesh( new THREE.PlaneGeometry( 5, 5 ), mat_crosshair );
// place it in the center
var crosshairPercentX = 50;
var crosshairPercentY = 50;
var crosshairPositionX = (crosshairPercentX / 100) * 2 - 1;
var crosshairPositionY = (crosshairPercentY / 100) * 2 - 1;
crosshair.position.x = crosshairPositionX * camera.aspect;
crosshair.position.y = crosshairPositionY;
crosshair.position.z = -0.3;
crosshair.rotation.y = 1.6;
camera.add( crosshair );
scene.add ( crosshair )
Any suggestions?