가고일 석상으로 인해 문이 내려가다가 멈춘다.
이 가고일에 컴포넌트에 접근하여서 물리적용 해제 하기

if (Actor != nullptr)
{
UPrimitiveComponent* Component = Cast<UPrimitiveComponent>(Actor->GetRootComponent());
if (Component != nullptr)
{
Component->SetSimulatePhysics(false);
}
Actor->AttachToComponent(this, FAttachmentTransformRules::KeepWorldTransform);
Mover->SetShouldMove(true);
}
- UPrimitiveComponent`는 Unreal Engine에서 사용되는 주요 컴포넌트 중 하나로, 모든 "기본적인" 렌더링 가능 컴포넌트의 기본 클래스
- SetSimulatePhysics(bool) 물리 시뮬레이션 on/off
- AttachToComponent : RootComponent를 제공된 구성 요소에 연결

결과

'언리얼' 카테고리의 다른 글
unreal) VisibleAnywhere, EditAnywhere, VisibleInstanceOnly (0) | 2024.11.09 |
---|---|
Unreal) GetOverlappingActors, DetachFromActor (0) | 2024.11.02 |
Unreal) 변수 저장이 안되는 라이브 코딩 이슈 (0) | 2024.08.17 |
Unreal)Unable to start debugging. check your debugger settings by opening project properties ...[에러] (0) | 2024.08.01 |
언리얼) 플레이어 지정하기 Pawn (0) | 2024.07.27 |