Unreal Engine/기타

충돌 시 카메라 줌인 해제하기

diesuki4 2023. 4. 11. 22:28
 

Disable forced zooming on camera?

Yo. Complete noob here. Here’s the problem: I’m making a 3D tactical RPG with free camera movement. I want to be able to fly over the characters with the camera, without the camera leaping forward to look past them. My camera pawn is a camera attached

forums.unrealengine.com

 

언리얼 엔진에서는 기본적으로 스프링 암과 Collision이 발생하면 충돌한 액터 앞으로 카메라가 줌인된다.

 

 

스프링 암의 Camera Collision - Do Collision Test 옵션을 꺼주면 액터를 뚫고 줌인하지 않게 된다.

 

 

단, 위 방법은 바닥을 포함한 모든 액터를 뚫게 된다.

 

Do Collision Test 옵션은 유지한 채, 무시할 액터의 Collision 설정에서 Camera 채널과의 반응을 무시로 설정하면 특정 액터만 뚫을 수 있다.

 

 

C++로는 다음과 같다.

 

 

카메라를 캐릭터가 가려도 줌인되지 않는다.