This is not a question that I’m going to ask but instead explain how to do it properly, because I struggled to do it for a long time, so I figured it’s the best share it how I did it.
First of all, you can’t rotate Euler angles, you need to do it with Quat, but if you want to rotate an object to an Euler angle smoothly, you need to convert it to the Quat first.
PlayCanvas has a function setFromEulerAngles for Quat. But this function’s first param doesn’t take a vector, so you need to set x, y, z one by one in args.
var nextEulerAngles = new pc.Vec3(59.85, 55.11, 64.53);
var rotation = this.entity.getRotation();
var quat = rotation.slerp(
rotation,
this.entity.getRotation().clone().setFromEulerAngles(
nextEulerAngles.x,
nextEulerAngles.y,
nextEulerAngles.z
),
0.1
);
this.entity.setLocalRotation(quat);
Here is the project link : PlayCanvas 3D HTML5 Game Engine