diff options
| author | Juan Linietsky | 2018-02-21 09:38:21 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2018-02-21 09:39:09 -0300 |
| commit | 9e3a1e5401f9f807085547de0ecc3f527610daa4 (patch) | |
| tree | ac58cd4f27e9dfe8ed550dfce9bfc442f29cd05a /core/variant.cpp | |
| parent | 1c77fdcc8516cf2f0c5083d4840a684b9ad90958 (diff) | |
| download | godot-9e3a1e5401f9f807085547de0ecc3f527610daa4.tar.gz godot-9e3a1e5401f9f807085547de0ecc3f527610daa4.tar.zst godot-9e3a1e5401f9f807085547de0ecc3f527610daa4.zip | |
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 2e26169bf..5d48c8785 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(); } |
