I'm trying to make a flight simulator for a project, and I'm trying to place a cockpit image in front of my camera, which is being controlled with FirstPersonControls, I've tried many things but I can't make it work.
I got this running in a: Codepen Project
This is where I'm trying to place the image.
function onTextureLoad(texture) {
console.log(texture);
var geometry = new THREE.PlaneGeometry(2, 2, 0);
var material = new THREE.MeshBasicMaterial({
map: texture, transparent: true, opacity: 1
});
var geometryco = new THREE.PlaneGeometry(100,100,100,100);
var cockpit = new THREE.Mesh(geometryco, material);
cockpit.position.set(0,20,0);
scene.add(cockpit);
render();
}
Any help would be appreciated
