diff options
author | Juan Linietsky <juan@godotengine.org> | 2018-02-21 09:38:21 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2018-02-21 09:39:09 -0300 |
commit | 9e3a1e5401f9f807085547de0ecc3f527610daa4 (patch) | |
tree | ac58cd4f27e9dfe8ed550dfce9bfc442f29cd05a /core/variant.cpp | |
parent | 1c77fdcc8516cf2f0c5083d4840a684b9ad90958 (diff) | |
download | redot-engine-9e3a1e5401f9f807085547de0ecc3f527610daa4.tar.gz |
Add base support for 2D meshes in Godot, including Sprite -> Mesh2D conversion.
Diffstat (limited to 'core/variant.cpp')
-rw-r--r-- | core/variant.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant.cpp b/core/variant.cpp index 2e26169bfe..5d48c8785e 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1607,6 +1607,8 @@ Variant::operator Vector3() const { if (type == VECTOR3) return *reinterpret_cast<const Vector3 *>(_data._mem); + else if (type == VECTOR2) + return Vector3(reinterpret_cast<const Vector2 *>(_data._mem)->x, reinterpret_cast<const Vector2 *>(_data._mem)->y, 0.0); else return Vector3(); } |