Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions DISPluginContent/Samples/Sample_HandleDISUpdates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ public void Start()
public void HandleDeadReckoningUpdate(EntityStatePdu DeadReckonedPDUIn)
{
Conversions.GetUnityLocationAndOrientationFromEntityStatePdu(DeadReckonedPDUIn, georeferenceSystemScript, out Vector3Double unityLoc, out Vector3 unityRot);
transform.position = new Vector3((float)unityLoc.X, (float)unityLoc.Y, (float)unityLoc.Z);
transform.rotation = Quaternion.Euler(unityRot);
transform.SetPositionAndRotation(new Vector3((float)unityLoc.X, (float)unityLoc.Y, (float)unityLoc.Z), Quaternion.Euler(unityRot));
//transform.position = new Vector3((float)unityLoc.X, (float)unityLoc.Y, (float)unityLoc.Z);
//transform.rotation = Quaternion.Euler(unityRot);
}

public void HandleEntityStateProcessed(EntityStatePdu EntityStatePDUIn)
{
Conversions.GetUnityLocationAndOrientationFromEntityStatePdu(EntityStatePDUIn, georeferenceSystemScript, out Vector3Double unityLoc, out Vector3 unityRot);
transform.position = new Vector3((float)unityLoc.X, (float)unityLoc.Y, (float)unityLoc.Z);
transform.rotation = Quaternion.Euler(unityRot);
transform.SetPositionAndRotation(new Vector3((float)unityLoc.X, (float)unityLoc.Y, (float)unityLoc.Z), Quaternion.Euler(unityRot));
//transform.position = new Vector3((float)unityLoc.X, (float)unityLoc.Y, (float)unityLoc.Z);
//transform.rotation = Quaternion.Euler(unityRot);
}

}
Expand Down