本文整理汇总了C++中UPrimitiveComponent::WakeAllRigidBodies方法的典型用法代码示例。如果您正苦于以下问题:C++ UPrimitiveComponent::WakeAllRigidBodies方法的具体用法?C++ UPrimitiveComponent::WakeAllRigidBodies怎么用?C++ UPrimitiveComponent::WakeAllRigidBodies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UPrimitiveComponent
的用法示例。
在下文中一共展示了UPrimitiveComponent::WakeAllRigidBodies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NotifyDrop_Implementation
void UGripMotionControllerComponent::NotifyDrop_Implementation(const FBPActorGripInformation &NewDrop, bool bSimulate)
{
if (bIsServer)
{
if (NewDrop.Actor)
{
NewDrop.Actor->RemoveTickPrerequisiteComponent(this);
this->IgnoreActorWhenMoving(NewDrop.Actor, false);
NewDrop.Actor->SetReplicateMovement(NewDrop.bOriginalReplicatesMovement);
}
else if (NewDrop.Component)
{
NewDrop.Component->RemoveTickPrerequisiteComponent(this);
if (NewDrop.Component->GetOwner())
{
this->IgnoreActorWhenMoving(NewDrop.Component->GetOwner(), false);
NewDrop.Component->GetOwner()->SetReplicateMovement(NewDrop.bOriginalReplicatesMovement);
}
}
}
DestroyPhysicsHandle(NewDrop);
UPrimitiveComponent *root = NewDrop.Component;
if (!root && NewDrop.Actor)
{
root = Cast<UPrimitiveComponent>(NewDrop.Actor->GetRootComponent());
if (root)
{
root->IgnoreActorWhenMoving(this->GetOwner(), false);
root->SetSimulatePhysics(bSimulate);
root->WakeAllRigidBodies();
root->SetEnableGravity(true);
}
}
else if (root)
{
root->IgnoreActorWhenMoving(this->GetOwner(), false);
root->SetSimulatePhysics(bSimulate);
root->WakeAllRigidBodies();
root->SetEnableGravity(true);
}
}