I am making a sphere dome through 360image
const imageUrl = “/textures/church360.jpg”; // replace with your 360 image URL
let dome = new PhotoDome(
“sphere”,
imageUrl,
{
resolution: 32, // Increase resolution
size: 500, // Adjust size as needed
useDirectMapping: false
},
scene
);
and added a character to this dome with some basicc movement
const loadModel = async () => {
const model = await SceneLoader.ImportMeshAsync(null, “https://assets.babylonjs.com/meshes/”, “HVGirl.glb”, scene);
const player = model.meshes[0];
player.scaling.setAll(0.1);
camera.lockedTarget = player; // target the player
let animating = false;
const walkAnim = scene.getAnimationGroupByName(“Walking”);
const walkBackAnim = scene.getAnimationGroupByName(“WalkingBack”);
const idleAnim = scene.getAnimationGroupByName(“Idle”);
const sambaAnim = scene.getAnimationGroupByName(“Samba”);
const playerWalkSpeed = 0.1;
const playerSpeedBackwards = 0.05;
const playerRotationSpeed = 0.03;
scene.onBeforeRenderObservable.add(() => {
var keydown = false;
// Manage the movements of the character (e.g. position, direction)
if (inputMap[“w”]) {
player.moveWithCollisions(player.forward.scaleInPlace(playerWalkSpeed));
keydown = true;
}
if (inputMap[“s”]) {
player.moveWithCollisions(player.forward.scaleInPlace(-playerSpeedBackwards));
keydown = true;
}
if (inputMap[“a”]) {
player.rotate(Vector3.Up(), -playerRotationSpeed);
keydown = true;
}
if (inputMap[“d”]) {
player.rotate(Vector3.Up(), playerRotationSpeed);
keydown = true;
}
if (inputMap[“b”]) {
keydown = true;
}
// Manage animations to be played
if (keydown) {
if (!animating) {
animating = true;
if (inputMap["s"]) {
// Walk backwards
walkBackAnim.start(true, 1.0, walkBackAnim.from, walkBackAnim.to, false);
} else if (inputMap["b"]) {
// Samba!
sambaAnim.start(true, 1.0, sambaAnim.from, sambaAnim.to, false);
} else {
// Walk
walkAnim.start(true, 1.0, walkAnim.from, walkAnim.to, false);
}
}
} else {
if (animating) {
// Default animation is idle when no key is down
idleAnim.start(true, 1.0, idleAnim.from, idleAnim.to, false);
// Stop all animations besides Idle Anim when no key is down
sambaAnim.stop();
walkAnim.stop();
walkBackAnim.stop();
// Ensure animations are played only once per rendering loop
animating = false;
}
}
});
}
so in this when we start moving character in the dome the image start looking curved from the edges you can also see the code from
here
can any one suggest the solution to this problem