Attaching certain effects to ArcRotateCamera

Hello Babylon Community,

I have two questions in mind to see if they are possible to apply in Babylon. Both questions are linked to attaching a certain effect to ArcRotateCamera, so here goes:

I have an ArcRotateCamera in a Babylon Scene with a model in the center of the scene and I want to know:

  1. If I have an HDR Cube Texture in my scene applied to the model, can I attach the HDR to my camera so that whenever I rotate the camera I would have the HDR rotate accordingly with the camera, so that whenever I look at the model from any angle I have the same view angle from the HDR.

  2. Another Question, If I have a 2D image in the background behind my model, is it possible to attach the image to the camera, so that whenever I rotate the camera I would have the image rotate with it accordingly and I would have the same background behind the model at all times.

Thank you all for your time,
Any help is appreciated.

For Question 2 if you want a fixed background you could use Use Multiple Scenes - Babylon.js Documentation

In this PG the foreground remains fixed and the camera sweeps the background skybox and the meteors Babylon.js Playground

By swapping which scene you attach the camera to (lines 11 -13 remove and copy to scene 2 instead) as in PG https://www.babylonjs-playground.com/#L0IMUD#63 the background and meteors do not move with the camera and the camera sweeps the foreground.

Hope this helps. If not I have given your question a bump up.

Hello @JohnK,

Thank you for your help I appreciate it.

The solution https://www.babylonjs-playground.com/#L0IMUD#63 you sent me is not exactly what I want but it’s really close! Can we have the same PG but with the meteors not moving, and I can only rotate the model in the center?

Check out the lines I have commented out https://www.babylonjs-playground.com/#L0IMUD#64

1 Like