[WL-814] 🔴 핫픽스: Little Heroes 임포트가 가져온 중복 클래스 제거(MouseOrbitImproved · CS0101 로 main 컴파일 불가)

Assets/Suriyun/Scripts/MouseOrbitImproved.cs 와 기존
Assets/ResWork/Suriyun/Scripts/MouseOrbitImproved.cs 가 둘 다 전역 네임스페이스의
같은 클래스라 중복 정의로 프로젝트 전체가 컴파일되지 않았다(58cc4f663 소행).
둘 다 우리 게임 씬/맵에서는 쓰이지 않는 벤더 데모용 궤도 카메라라,
이번에 들어온 쪽만 지워 임포트 전 상태로 되돌린다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
깃 관리자 2026-09-12 18:45:01 +09:00
parent 58cc4f6634
commit 9b17460bef
2 changed files with 0 additions and 99 deletions

View File

@ -1,81 +0,0 @@
using UnityEngine;
using UnityEngine.InputSystem;
[AddComponentMenu("Camera-Control/Mouse Orbit with zoom (New Input System)")]
public class MouseOrbitImproved : MonoBehaviour
{
public Transform target;
public float distance = 5.0f;
public float xSpeed = 120.0f;
public float ySpeed = 120.0f;
public float yMinLimit = -20f;
public float yMaxLimit = 80f;
public float distanceMin = .5f;
public float distanceMax = 15f;
private Rigidbody rb;
float x = 0.0f;
float y = 0.0f;
void Start()
{
Vector3 angles = transform.eulerAngles;
x = angles.y;
y = angles.x;
rb = GetComponent<Rigidbody>();
if (rb != null)
rb.freezeRotation = true;
}
void LateUpdate()
{
if (!target) return;
// ===== New Input System =====
Vector2 mouseDelta = Vector2.zero;
float scroll = 0f;
if (Mouse.current != null)
{
mouseDelta = Mouse.current.delta.ReadValue();
scroll = Mouse.current.scroll.ReadValue().y;
}
// Rotate
x += mouseDelta.x * xSpeed * distance * 0.02f;
y -= mouseDelta.y * ySpeed * 0.02f;
y = ClampAngle(y, yMinLimit, yMaxLimit);
Quaternion rotation = Quaternion.Euler(y, x, 0);
// Zoom
distance = Mathf.Clamp(
distance - scroll * 0.01f * 5f,
distanceMin,
distanceMax
);
// Collision
if (Physics.Linecast(target.position, transform.position, out RaycastHit hit))
{
distance -= hit.distance;
}
Vector3 negDistance = new Vector3(0.0f, 0.0f, -distance);
Vector3 position = rotation * negDistance + target.position;
transform.rotation = rotation;
transform.position = position;
}
public static float ClampAngle(float angle, float min, float max)
{
if (angle < -360f) angle += 360f;
if (angle > 360f) angle -= 360f;
return Mathf.Clamp(angle, min, max);
}
}

View File

@ -1,18 +0,0 @@
fileFormatVersion: 2
guid: 910c94d472b153f41b52c47affc32478
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 263555
packageName: Little Heroes Pack
packageVersion: 3.2
assetPath: Assets/Suriyun/Scripts/MouseOrbitImproved.cs
uploadId: 834578