Skip to content

Commit

Permalink
Merge pull request #281 from UE4SS-RE/frotator_5_0_support
Browse files Browse the repository at this point in the history
Changed FRotator internals to be the same as FVector and FQuat
  • Loading branch information
UE4SS authored Nov 8, 2023
2 parents 09b914b + 6a6215c commit e743743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions UE4SS/src/GUI/Dumpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ namespace RC::GUI::Dumpers

auto& rotation_json_object = root_component_json_object.new_object(STR("Rotation"));
auto rotation = (*root_component)->GetValuePtrByPropertyNameInChain<FRotator>(STR("RelativeRotation"));
rotation_json_object.new_number(STR("Pitch"), rotation->Pitch);
rotation_json_object.new_number(STR("Yaw"), rotation->Yaw);
rotation_json_object.new_number(STR("Roll"), rotation->Roll);
rotation_json_object.new_number(STR("Pitch"), rotation->GetPitch());
rotation_json_object.new_number(STR("Yaw"), rotation->GetYaw());
rotation_json_object.new_number(STR("Roll"), rotation->GetRoll());

auto& scale_json_object = root_component_json_object.new_object(STR("Scale"));
auto scale = (*root_component)->GetValuePtrByPropertyNameInChain<FVector>(STR("RelativeScale3D"));
Expand Down
6 changes: 3 additions & 3 deletions UE4SS/src/LuaType/LuaUWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ No overload found for function 'SpawnActor'.
lua.for_each_in_table([&](const LuaMadeSimple::LuaTableReference& table) {
if (table.key.is_string() && table.key.get_string() == "Yaw" && table.value.is_number())
{
rotation.Yaw = table.value.get_number();
rotation.SetYaw(table.value.get_number());
}

if (table.key.is_string() && table.key.get_string() == "Pitch" && table.value.is_number())
{
rotation.Pitch = table.value.get_number();
rotation.SetPitch(table.value.get_number());
}

if (table.key.is_string() && table.key.get_string() == "Roll" && table.value.is_number())
{
rotation.Roll = table.value.get_number();
rotation.SetRoll(table.value.get_number());
}
return false;
});
Expand Down

0 comments on commit e743743

Please sign in to comment.