Bug of positioning of animation of doors and drawer of shapediver model

Hello guys,
I’ve done the on-click animations of drawers and doors for my shapediver model on my front end but I’m facing an issue, when I click then sometimes the door after animation goes back to its original position, and sometimes not. It’s not fixed, sometimes it happens more for door1 let’s say not for door2 but sometimes it happens for both door1,2 It also changes as per the sequence of the clicking. And sometimes it works smoothly, doesn’t happens at all. Similarly for the drawers.

For DOORS-

These are original positions
original2

Below are the pictures when I clicked doors in this sequence- door1, door2, door3, door 4
On clicking 1,2
animation1

then on clicking 3,4
animation2

On relaoding and after changing the sequence of clicking it kinda looked same this time
animation6

For DRAWERS-

The original positions
original1

When I clicked drawer in the sequence- drawer1, drawer2, drawer3
animation4

On reloading when I clicked drawers like - drawer2, drawer3, drawer1
animation5

My animation code-

For doors-
const times = [0, 1, 2, 3];
const values = [
quat0[0], quat0[1], quat0[2], quat0[3],
quat1[0], quat1[1], quat1[2], quat1[3],
quat1[0], quat1[1], quat1[2], quat1[3],
quat0[0], quat0[1], quat0[2], quat0[3],
];

            const tracks: IAnimationTrack[] = [
                {
                    times: times,
                    node: doorChildNode,
                    values: values,
                    path: "rotation",
                    interpolation: "linear",
                    pivot: pivot_animation
                }
            ];
           const data = new AnimationData("DoorHandleRotationAnimation", tracks, 0, 6);
            session.node.data.push(data);

For drawers-
const times = [0, 1, 2, 3];
const values = [
start.x, start.y, start.z,
start.x, start.y - amplitude, start.z,
start.x, start.y - amplitude, start.z,
start.x, start.y, start.z
];

            const tracks: IAnimationTrack[] = [
                {
                    times: times,
                    node: doorChildNode,
                    values: values,
                    path: "translation",
                    interpolation: "linear"
                }
            ];
           const data = new AnimationData("DoorHandleRotationAnimation", tracks, 0, 6);
            session.node.data.push(data);

Is this a glitch of shapediver or animation issue?
Can you guys help me finding why it’s happening and how to solve this?

@MajorMeerkatThe3rd
@mathieu1

Hello @Ankita_Kushwaha,

which version are you currently using? There was an issue in one of the last viewer version which was fixed in version 3.1.2.

Cheers, Michael

Hello @MajorMeerkatThe3rd ,

I’m using version 2.12.10.

So how should I fix this? When I tried installing the new version then it gave errors in my files so I installed the old version again.

Hello @Ankita_Kushwaha,

as soon as you update to the newest version this will be fixed. The errors result from some breaking changes, these are documented here.

Cheers, Michael