#Trouble with camera easeOptions

1 messages · Page 1 of 1 (latest)

pine grotto
#

Hello, I'm having trouble with getting camera easeOptions to work. I want to create a cinematic basically which executes some commands after some time has passed. While the cinematic works and the camera positions do change, my main issue is with easeOptions not having any effect, meaning that going from point A to point B is instant.
My code in question can be seen below:

    const vetAmbulance = world.getDimension("overworld").getEntities({ type: "myname:vet_ambulance", tags: ["minigame_van"] })[0];
    if (!vetAmbulance) return;
    //Initial Camera Angle
    system.runTimeout(() => {
        player.camera.setCamera("minecraft:free", {
            location: { x: 173, y: -41, z: -322 },
            rotation: { x: 20, y: 0 }
        });
        player.teleport({x:188, y:-43, z:vetAmbulance.location.z})
        player.setRotation({x:0,y:90})
    },10);
    //
    system.runTimeout(() => {
        player.camera.setCamera("minecraft:free", {
            location: { x: 156, y: -41, z: -321 },
            rotation: { x: 20, y: 0 },
            easeOptions: {
                easeTime: 8.0,
                easeType: "Linear"
            }
        });
    }, 20);
    system.runTimeout(() => {
        player.camera.setCamera("minecraft:free", {
            location: { x: 172, y: -41, z: -321 },
            rotation: { x: 20, y: 0 },
            easeOptions: {
                easeTime: 6.0,
                easeType: "Linear"
            }
        });
    }, 180);
    system.runTimeout(() => {
        player.camera.clear()
    }, 300);
}```
white pendant
#

but that's not the problem hehehe

pine grotto
white pendant
#

so, how'd you know the easing doesn't work? The camera changes but the easing animations don't?

pine grotto
#

I tried replacing the floats with ints on easeTime, changed the easeType from a string to EasingType.Linear and also replaced system.runTimeout with system.runInterval and if statements and I still get the same issue

white pendant
white pendant
#

And do a setCamera with easing if the animation works then the problem is with the class

pine grotto