local trace = util.GetPlayerTrace(self.Ply) trace.Filter = self.Pod self.VPos = util.TraceLine(trace).HitPos local BeaconPos = self.VPos local DeltaPos = self.Entity:WorldToLocal(BeaconPos) brng = DeltaPos:Angle() local pitch = brng.p local yaw = brng.y if (pitch > 180) then pitch = pitch - 360 end if (yaw > 180) then yaw = yaw - 360 end if (pitch < -180) then pitch = pitch + 360 end if (yaw < -180) then yaw = yaw + 360 end Wire_TriggerOutput(self.Entity, "Bearing", yaw + 90) Wire_TriggerOutput(self.Entity, "Elevation", -pitch)