public void Rotate(float dir) { if (ControlDisabled.IsIn()) { return; } wantYAngle += dir; BaseMathUtils.WrapAngle(wantYAngle); }
public void Start() { DesktopMoveDragSpeed = desktopMoveDragSpeed; DesktopMoveSpeed = desktopMoveSpeed; objectPos = CalculateCurrentObjectPosition(); scrollValue = Mathf.Clamp01(scrollValue); objectPos.y = scrollHigh.Evaluate(scrollValue); wantXAngle = scrollXAngle.Evaluate(scrollValue); Vector3 rot = selfT.eulerAngles; rot.x = BaseMathUtils.WrapAngle(rot.x); rot.y = BaseMathUtils.WrapAngle(rot.y); wantYAngle = rot.y; rot.x = scrollXAngle.Evaluate(scrollValue); wantXAngle = rot.x; selfT.eulerAngles = rot; ScreenEdgeMovementControl(screenEdgeMovementControl); MouseDragControl(mouseDragControl); MouseScrollControl(mouseScrollControl); }