So for the game I am working on I have a crosshair that is always at the spot the players mouse is and I am trying to make where the crosshair is it is always shown.
Like in this post (example) problem is I want to do this with a single camera,help?
(function() {
const app = pc.Application.getApplication();
app.on('start', () => {
// We have special layer that we want to set so that it clears the depth buffer
// This helps us render the weapon on top of the world
const clearDepthLayer = app.scene.layers.getLayerByName('Clear Depth');
clearDepthLayer.clearDepthBuffer = true;
});
})();
This means that anything that renders after this layer is going to render over anything that has rendered before.
I would check the layer order. Are the player and enemy layers before the layer that clears the depth buffer and is the cross hair rendering after that layer