1. ์นด๋ฉ๋ผ๊ฐ ์บ๋ฆญํฐ ๋ชธ์ ๋ซ๋ ํ์
์บ๋ฆญํฐ๊ฐ ์ค๋ธ์ ํธ์ ๊ฐ๊น์ด ๊ฐ๊ฒ ๋๋ฉด, ์นด๋ฉ๋ผ์ ์ค๋ธ์ ํธ๊ฐ ๊ฐ๊น์์ ธ ์บ๋ฆญํฐ ๋ชธ์ ๋ซ๋ ํ์์ด๋ค.

Collision Presets ๋ด Camera ์ค์ ์ Block์ผ๋ก ๋ณ๊ฒฝํ๋ฉด ๋๋ค.
Default๋ก Block ์ค์ ๋์ด ์์ง๋ง ํน์๋ ๋ค๋ฅธ ๊ฐ์ผ๋ก ์์ ํ์ ๊ฒฝ์ฐ ๋ณ๊ฒฝ์ด ํ์ํ๋ค.

์ด๋ ๊ฒ ๋ณ๊ฒฝํ๋๋ผ๋ ๋งค์ฐ ๊ฐ๊น๊ฒ ์นด๋ฉ๋ผ๊ฐ ์ด๋ํ๋ฉด ์ฌ์ ํ ๋ชธ์ ๋ซ๊ณ ์๋ค.
์ด๋ด ๋ ํ๋ก์ ํธ ์ธํ ์์ Near Clip Plane ๊ฐ์ ๋ณ๊ฒฝํ ํ ํ๋ก์ ํธ๋ฅผ ๋ค์ ์์ํ๋ฉด ๋๋ค.

์ด๋ ๊ฒ ๊ฐ๊น๊ฒ ์นด๋ฉ๋ผ๊ฐ ๋ถ์ด๋ ๋ชธ์ ๋ซ์ง ์๋๋ค.

2. ์นด๋ฉ๋ผ ์ถฉ๋
์นด๋ฉ๋ผ์ ์ค๋ธ์ ํธ๊ฐ ๊ฐ๊น์์ง๋ฉด ์๊ฐ์ ์ผ๋ก ์นด๋ฉ๋ผ๊ฐ ์ด๋๋๋๋ฐ, ์์ง์์ด ๋ฑ๋ฑํด์ ์ด์ํด ๋ณด์ธ๋ค.

๊ทธ๋์ ์นด๋ฉ๋ผ Collision์ ์ง์ ๊ตฌํํด ๋ณผ ๊ฒ์ด๋ค. ๋จผ์ ์บ๋ฆญํฐ ์นด๋ฉ๋ผ์ Do Collision Test๋ฅผ fasle๋ก ๋ณ๊ฒฝํ๋ค.

1) ๋ธ๋ฃจํ๋ฆฐํธ ๊ตฌํ
Event Tick ๋ ธ๋์์ ๋ค์๊ณผ ๊ฐ์ด ๊ตฌํํ๋ค.

Sphere Trace By Channel ๋ ธ๋๋ ํํ ๋งํ๋ Raycast์ ๋์ผํ ๊ธฐ๋ฅ์ด๋ค. Start์ End ์ฌ์ด์ ์ ์ ๊ทธ์ด ์ถฉ๋ ๋ฑ์ ํ๋จํ ๋ ์ฌ์ฉํ๋ค. ๋ณดํต Line Trace๋ฅผ ์ฌ์ฉํ์ง๋ง Sphere Trace์ธ ์ด์ ๋ ํ๋ ์ด์ด๋ฅผ ๊ฐ์งํ๊ธฐ ์ํ ์์ผ ์๋ฟ์ ๋ง๋ค์ด์ผ ํ ๋, ์ ํฌ๋ฆฐ ํ๋ ์ด์ด์ ๊ฐ์ด ๋ชจ๋ ์ํฉ์ ํ๋จํ๊ธฐ์ ์ด๋ ค์์ด ์๊ธฐ ๋๋ฌธ์ด๋ค.
- Start: SpringArmCamera์ ์๋ ์์น
- End: SpringArmCamera์ ์๋ ์์น + SpringArmCamera์ FollowCamera ์ฌ์ด์ ๋ฐฉํฅ ๋ฒกํฐ * ๊ธฐ๋ณธ SpringArmCamera ๊ธธ์ด

Trace๋ฅผ ํตํด Hit๋ ์ค๋ธ์ ํธ๋ฅผ ์ฐพ์๋ค๋ฉด, ์ด๋ํด์ผ ํ SpringArmCamera ๊ธธ์ด๋ฅผ ๊ตฌํ๋ค.
- True: Hit๋ ์ค๋ธ์ ํธ๋ฅผ ์ฐพ์๋ค
- Clamp(Break Hit Result์ Distance -5, 5, ๊ธฐ๋ณธ ๊ธธ์ด)
- Break Hit Result์ Distance: Hit๋ ์ค๋ธ์ ํธ์์ ๊ฑฐ๋ฆฌ
- -5: Hit๋ ์ค๋ธ์ ํธ๋ก ์ด๋์ํค๋ฉด ์ค๋ธ์ ํธ๊ฐ ๋ซ๋ ค ๋ณด์ผ ์ ์์ด ์ด์ง ์์ผ๋ก ์ด๋
- Clamp: ์ต์ 5๋ถํฐ ์ต๋ ๊ธฐ๋ณธ ๊ธธ์ด๊น์ง ๊ฐ๋ฅ
- Clamp(Break Hit Result์ Distance -5, 5, ๊ธฐ๋ณธ ๊ธธ์ด)
- False: Hit๋ ์ค๋ธ์ ํธ๊ฐ ์๋ค.
- ๊ธฐ๋ณธ SpringArmCamera ๊ธธ์ด
๊ทธ๋ฆฌ๊ณ ๊ตฌํ SpringArmCamera ๊ธธ์ด๋ฅผ ๋ถ๋๋ฝ๊ฒ ์ด๋์ํค๋ฉด ๋๋ค.
- FInterp To: Current๋ถํฐ Target๊น์ง ๋ณด๊ฐ ๊ฐ์ Return ํ๋ ๋ ธ๋
2) C++ ๊ตฌํ
float MaxCameraArmLength = 150;
float CameraArmLength = MaxCameraArmLength;
FVector Start = CameraBoom->GetComponentLocation();
FVector End = UKismetMathLibrary::GetDirectionUnitVector(Start, FollowCamera->GetComponentLocation()) * MaxCameraArmLength + Start;
TArray<AActor*> ToIgnore;
FHitResult OutCameraHit;
bool IsCameraHit = UKismetSystemLibrary::SphereTraceSingle(
GetWorld(), Start, End,
CameraBoom->ProbeSize,
ETraceTypeQuery::TraceTypeQuery1, true,
ToIgnore,
EDrawDebugTrace::None, OutCameraHit, true);
if (IsCameraHit)
{
CameraArmLength = UKismetMathLibrary::Clamp(OutCameraHit.Distance - CameraBoom->ProbeSize, 30, MaxCameraArmLength);
}
CameraBoom->TargetArmLength = UKismetMathLibrary::FInterpTo(CameraBoom->TargetArmLength, CameraArmLength, DeltaTime, 10);
์ถฉ๋ํด๋ ๋ถ๋๋ฝ๊ฒ ์์ง์ด๊ณ ์๋ค!

์ฐธ๊ณ
https://forums.unrealengine.com/t/reducing-erratic-camera-collision-behavior/115086/4
Reducing erratic camera collision behavior
I do believe ive come up with a solution - i found the jitter cause, just break the hit result and plug in the distance to a print string and youll see that it equals zero when the camera gets close to the player. Basically the trace doesnt do anything at
forums.unrealengine.com
https://youtu.be/cFfCRpxl9c4?si=uWkgbMWfnuCf10rj