public void MouseRotate(EventSystemOnDragEvent e, ScreenForegroundNode screenForeground, [JoinAll] HangarCameraTankViewRotateNode hangar) { HangarCameraRotateEvent eventInstance = new HangarCameraRotateEvent(); float num = e.PointerEventData.delta.x * hangar.hangarConfig.MouseRotateFactor; eventInstance.Angle = num; hangar.hangarCameraDecelerationRotate.Speed = num / Time.deltaTime; hangar.hangarCameraDecelerationRotate.LastUpdateFrame = Time.frameCount; base.ScheduleEvent(eventInstance, hangar); }
public void RotateCamera(HangarCameraRotateEvent e, HangarCameraTankViewStateNode hangar) { hangar.cameraRootTransform.Root.LookAt(hangar.hangarTankPosition.transform.position); hangar.cameraRootTransform.Root.RotateAround(hangar.hangarTankPosition.transform.position, Vector3.up, e.Angle); }