public void Rotate(float dir) { if (ControlDisabled.IsIn()) { return; } wantYAngle += dir; MathUtil.WrapAngle(wantYAngle); }
public void SetScroll(float value) { if (ControlDisabled.IsIn()) { return; } ScrollValue = value; ScrollValue = Mathf.Clamp01(ScrollValue); objectPos.y = scrollHigh.Evaluate(ScrollValue); wantXAngle = scrollXAngle.Evaluate(ScrollValue); }
void _Move(Vector3 dir, float speed) { if (ControlDisabled.IsIn()) { return; } dir.y = 0; dir.Normalize(); dir *= speed; if (unlockWhenMove && dir != Vector3.zero) { followingTarget = null; fixedPoint = null; } objectPos += dir; objectPos.x = Mathf.Clamp(objectPos.x, bound.xMin, bound.xMax); objectPos.z = Mathf.Clamp(objectPos.z, bound.yMin, bound.yMax); }