From d0e70d0462c2c9ac34fb7681803dbee96c1c32a6 Mon Sep 17 00:00:00 2001 From: Chris Wall Date: Sat, 18 Jul 2026 08:51:00 -0400 Subject: [PATCH] feat: Actor Pitch --- .../Private/RemoteMonitoringLibrary.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/FicsitRemoteMonitoring/Private/RemoteMonitoringLibrary.cpp b/Source/FicsitRemoteMonitoring/Private/RemoteMonitoringLibrary.cpp index 9f6d5bce..0875a5a7 100644 --- a/Source/FicsitRemoteMonitoring/Private/RemoteMonitoringLibrary.cpp +++ b/Source/FicsitRemoteMonitoring/Private/RemoteMonitoringLibrary.cpp @@ -34,21 +34,23 @@ TSharedPtr URemoteMonitoringLibrary::getActorJSON(AActor* Actor) { TSharedPtr JLibrary = MakeShared(); - long double primaryX = Actor->GetActorLocation().X; - long double primaryY = Actor->GetActorLocation().Y; - long double primaryZ = Actor->GetActorLocation().Z; - + const long double primaryX = Actor->GetActorLocation().X; + const long double primaryY = Actor->GetActorLocation().Y; + const long double primaryZ = Actor->GetActorLocation().Z; + const long double pitch = Actor->GetActorRotation().Pitch; + // UE rotations range from -180 to 180 with zero as "forward" and negative values "left". // In Satisfactory this results in a rotation of zero being due east. // FRM will normalise this to a range of 0 <= x < 360 with zero as due north. long double rotation = Actor->GetActorRotation().Yaw; rotation += 450; rotation = fmod(rotation, 360); - + JLibrary->Values.Add("x", MakeShared(primaryX)); JLibrary->Values.Add("y", MakeShared(primaryY)); JLibrary->Values.Add("z", MakeShared(primaryZ)); JLibrary->Values.Add("rotation", MakeShared(rotation)); + JLibrary->Values.Add("pitch", MakeShared(pitch)); return JLibrary;