작성
·
30
0
안녕하세요!
아래 코드는 UPrimitiveComponent의 UpdatePhysicsVolume 함수인데, 컴포넌트의 owner인 액터를 가져와서 그대로 Cast<APhysicsVolume>을 했는데,
액터가 캐릭터일 수도 있을 텐데 이게 어떻게 가능한 것인지 모르겠습니다...
감사합니다
// haker: just get the owner Actor and compare Physics Volume's priority
APhysicsVolume* V = Cast<APhysicsVolume>(OtherComponent->GetOwner());
if (V && V->Priority > BestPriority)
{
if (V->IsOverlapInVolume(*this))
{
BestPriority = V->Priority;
BestVolume = V;
}
}