diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-03-08 23:54:46 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-03-08 23:54:46 +0100 |
commit | 1dad6eca812e5c2e313b54265114de8a1d73d999 (patch) | |
tree | 24584eec4a708679c0fd66f4e52e637c92f12cbe /core | |
parent | a3d6768199c2100391343083900177c129a683d6 (diff) | |
parent | 2fa200ff5380d03bf3f581c00ef202729983423f (diff) |
Merge pull request #3991 from JoshuaGrams/issue-3711
Issue 3711
Diffstat (limited to 'core')
-rw-r--r-- | core/variant_op.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 5463e1cabb..9887c50dd8 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<const Rect2*>(b._data._mem); r_dst=Rect2(ra->pos + rb->pos * c, ra->size + rb->size * c); } return; - case VECTOR3:{ r_dst=*reinterpret_cast<const Vector2*>(a._data._mem)+*reinterpret_cast<const Vector2*>(b._data._mem)*c; } return; + case VECTOR3:{ r_dst=*reinterpret_cast<const Vector3*>(a._data._mem)+*reinterpret_cast<const Vector3*>(b._data._mem)*c; } return; case _AABB:{ const AABB *ra = reinterpret_cast<const AABB*>(a._data._mem); const AABB *rb = reinterpret_cast<const AABB*>(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<const Quat*>(a._data._mem); + const Quat *qb = reinterpret_cast<const Quat*>(b._data._mem); + r_dst=*qa * empty_rot.slerp(*qb,c); + } return; case COLOR:{ const Color *ca = reinterpret_cast<const Color*>(a._data._mem); const Color *cb = reinterpret_cast<const Color*>(b._data._mem); |