Skip to content

Commit

Permalink
UObjectHook: Display socket locations/rotations
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jun 7, 2024
1 parent d122b8a commit d6c98aa
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/mods/UObjectHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2523,7 +2523,21 @@ void UObjectHook::ui_handle_scene_component(sdk::USceneComponent* comp) {
const auto socket_names = comp->get_all_socket_names();

for (auto& name : socket_names) {
ImGui::Text("%s", utility::narrow(name.to_string()).data());
//ImGui::Text("%s", utility::narrow(name.to_string()).data());
if (ImGui::TreeNode(utility::narrow(name.to_string()).data())) {
auto location = comp->get_socket_location(name.to_string());
auto rotation = comp->get_socket_rotation(name.to_string());

if (ImGui::DragFloat3("Location", &location.x, 0.1f)) {
//comp->set_socket_location(name, location);
}

if (ImGui::DragFloat3("Rotation", &rotation.x, 0.1f)) {
//comp->set_socket_rotation(name, rotation);
}

ImGui::TreePop();
}
}

ImGui::TreePop();
Expand Down

0 comments on commit d6c98aa

Please sign in to comment.