diff options
Diffstat (limited to 'core/variant_op.cpp')
-rw-r--r-- | core/variant_op.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 1cdf6d7319..39a802e171 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -586,7 +586,21 @@ void Variant::evaluate(const Operator& p_op, const Variant& p_a, const Variant& } break; DEFAULT_OP_LOCALMEM_NUM(*,VECTOR3,Vector3); DEFAULT_OP_FAIL(PLANE); - DEFAULT_OP_FAIL(QUAT); + case QUAT: { + + switch(p_b.type) { + case VECTOR3: { + + _RETURN( reinterpret_cast<const Quat*>(p_a._data._mem)->xform( *(const Vector3*)p_b._data._mem) ); + } break; + case QUAT: { + + _RETURN( *reinterpret_cast<const Quat*>(p_a._data._mem) * *reinterpret_cast<const Quat*>(p_b._data._mem) ); + } break; + }; + r_valid=false; + return; + } break; DEFAULT_OP_FAIL(_AABB); case MATRIX3: { |