mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add base support for 2D meshes in Godot, including Sprite -> Mesh2D conversion.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user