You should be able to activate those cameras consistently, I do not expect interaction from a user to change the alignment or position of the object when the cameras are rotated.
Can you elaborate on what is happening when you try to take the snapshots? Can you confirm the cameras are active before taking the snapshots?
There are totally 4 cameras in the scene . One is default camera . And three to take snapshots . The user interacts with objects in the player and make changes in the attributes . The user turn the object also .
Now when he click for snapshot options , we are changing the active camera to three camera one by one and taking snapshot . Because the user has rotated the object the alignment mismatches . The view is correct
Hi Prashant, this should be an easy fix. The issue seems to be that your scene is using the Top camera as the scene’s camera as well as a point for the snapshot.
This means that when you have a user interacting with the model and spinning it around, they are quite literally changing the angle of this camera, which in turn skews the angles of the Snapshot.
If you remove the scene camera parameter or use a separate camera that is not used for the snapshots, this should result in expected behavior.
Yes but if you use one of those same cameras for your scene and the user moves the item, it will affect the camera angles in the future. They do not need an attribute to change the camera angle if that camera is used for the scene.
I would suggest using a separate camera for your scene and not any of the ones you are using for your snapshot. See the scene I DMd you for reference.
Earlier we had only 3 as you have suggested. The problem with three only was, when we set the cameras to take screenshot , in the end the the last camera chosen to take photo graph is selected. and if the user has roatated the object it will reset to last camera position.
So we have created a 4th camera. we are saving the position of the default camera before taking screenshot and resetting it to 4 camera again. but then alignment of the table get reset.
vCampos=window.threekit.api.camera.getPosition();
var d = {} //for screenshots
vCamQuat=window.threekit.api.camera.getQuaternion();
window.threekit.configurator.setConfiguration({"Camera":"Top"});
d["Top"]= await window.threekit.api.snapshotAsync();
window.threekit.configurator.setConfiguration({"Camera":"Side"});
d["Side"]=await window.threekit.api.snapshotAsync();
window.threekit.configurator.setConfiguration({"Camera":"Default"});
d["Default"]=await window.threekit.api.snapshotAsync();
window.threekit.configurator.setConfiguration({"Camera":"onLoad"});
window.threekit.api.camera.setPosition(vCampos);
window.threekit.api.camera.setQuaternion(vCamQuat);
Sorry maybe I am misunderstanding - can you confirm that the camera you have selected in your Scene’s Player section is different than any of the cameras you are using for the snapshots?
If the camera selected for your scene is the same as any you use in setConfiguration({...}) you may encounter the issue.
I believe, in the scene/asset you linked originally, the camera used in the scene is the same as a camera that is used for the snapshot and they must be different.
In your cameras available for screenshots, you have Top available here as well.
This means that any time someone interacts with your scene, they are moving the camera Top. When you select Top to capture the screenshot, it will be different from where you expect it because it has been moved. You need to create camera in your scene that is not the same as Top.
This is still the scene you are referencing, correct? If so, please be sure to check the player settings in the scene and not in the logic.