feat(lobby): 로비 카메라를 플레이어 추종(follow)으로 — 전투맵은 고정 유지

로비 루트에서 script.MapCamera 제거(고정 framing 억제 해제) + LobbyMobility가 진입 시
ConfineCameraArea=false·ScreenOffset(0.5,0.5)·Zoom 90으로 플레이어 추종 카메라 설정.
MSW 카메라는 기본 follow이고 ConfineCameraArea=true가 그걸 억제하므로 false가 핵심.
검증: 로비 우측 이동 시 플레이어 중앙 유지+배경 스크롤, 런 시작→map01 Confine=true 고정, 복귀→follow 복원(누설 없음).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 08:05:22 +09:00
parent 1fce0b284a
commit 9cb5e1abff
4 changed files with 19 additions and 13 deletions

View File

@@ -97,15 +97,14 @@ for (const e of ents) {
const root = ents.find((e) => e.path === '/maps/lobby');
if (!root) throw new Error('[gen-lobby-map] 맵 루트 없음');
// 로비엔 PlayerLock 제거(이동 허용) + LobbyMobility 추가(이동·공격 해제). MapCamera는 유지.
root.jsonString['@components'] = root.jsonString['@components'].filter(
(c) => !['script.PlayerLock', 'script.LobbyMobility'].includes(c['@type']),
);
// 로비엔 PlayerLock 제거(이동 허용) + MapCamera 제거(고정 framing 대신 follow) + LobbyMobility 추가.
// LobbyMobility가 이동 해제 + 플레이어 추종 카메라를 함께 설정 — MapCamera와 공존하면
// ConfineCameraArea true/false가 경쟁하므로 MapCamera를 빼야 한다.
const ROOT_STRIP = ['script.PlayerLock', 'script.MapCamera', 'script.LobbyMobility'];
root.jsonString['@components'] = root.jsonString['@components'].filter((c) => !ROOT_STRIP.includes(c['@type']));
root.jsonString['@components'].push({ '@type': 'script.LobbyMobility', Enable: true });
{
const names = (root.componentNames || '')
.split(',')
.filter((s) => s && !['script.PlayerLock', 'script.LobbyMobility'].includes(s));
const names = (root.componentNames || '').split(',').filter((s) => s && !ROOT_STRIP.includes(s));
names.push('script.LobbyMobility');
root.componentNames = names.join(',');
}