diff --git a/lua-api/lib/src/ScriptUtility.cpp b/lua-api/lib/src/ScriptUtility.cpp index cb01ace3..72aca99d 100644 --- a/lua-api/lib/src/ScriptUtility.cpp +++ b/lua-api/lib/src/ScriptUtility.cpp @@ -151,7 +151,7 @@ sol::object prop_to_object(sol::this_state s, void* self, uevr::API::FProperty* return sol::make_object(s, sol::lua_nil); } - if (struct_desc == get_vector_struct()) { + if (struct_desc == get_vector_struct() || struct_desc == get_rotator_struct()) { if (is_ue5()) { if (is_self_temporary) { return sol::make_object(s, *(lua::datatypes::Vector3d*)struct_data); diff --git a/lua-api/lib/src/datatypes/Vector.cpp b/lua-api/lib/src/datatypes/Vector.cpp index f5275796..c68de39a 100644 --- a/lua-api/lib/src/datatypes/Vector.cpp +++ b/lua-api/lib/src/datatypes/Vector.cpp @@ -11,6 +11,9 @@ namespace lua::datatypes { "X", &name::x, \ "Y", &name::y, \ "Z", &name::z, \ + "Pitch", &name::x, \ + "Yaw", &name::y, \ + "Roll", &name::z, \ "dot", [](name& v1, name& v2) { return glm::dot(v1, v2); }, \ "cross", [](name& v1, name& v2) { return glm::cross(v1, v2); }, \ "length", [](name& v) { return glm::length(v); }, \ @@ -45,6 +48,9 @@ namespace lua::datatypes { "Y", &name::y, \ "Z", &name::z, \ "W", &name::w, \ + "Pitch", &name::x, \ + "Yaw", &name::y, \ + "Roll", &name::z, \ "dot", [](name& v1, name& v2) { return glm::dot(v1, v2); }, \ "length", [](name& v) { return glm::length(v); }, \ "normalize", [](name& v) { v = glm::normalize(v); }, \