diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 5463e1cabbd..9887c50dd88 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -3461,12 +3461,18 @@ void Variant::blend(const Variant& a, const Variant& b, float c, Variant &r_dst) const Rect2 *rb = reinterpret_cast(b._data._mem); r_dst=Rect2(ra->pos + rb->pos * c, ra->size + rb->size * c); } return; - case VECTOR3:{ r_dst=*reinterpret_cast(a._data._mem)+*reinterpret_cast(b._data._mem)*c; } return; + case VECTOR3:{ r_dst=*reinterpret_cast(a._data._mem)+*reinterpret_cast(b._data._mem)*c; } return; case _AABB:{ const AABB *ra = reinterpret_cast(a._data._mem); const AABB *rb = reinterpret_cast(b._data._mem); r_dst=AABB(ra->pos + rb->pos * c, ra->size + rb->size * c); } return; + case QUAT:{ + Quat empty_rot; + const Quat *qa = reinterpret_cast(a._data._mem); + const Quat *qb = reinterpret_cast(b._data._mem); + r_dst=*qa * empty_rot.slerp(*qb,c); + } return; case COLOR:{ const Color *ca = reinterpret_cast(a._data._mem); const Color *cb = reinterpret_cast(b._data._mem);