Cloth works with Actors in Atom. Cloth system uses MeshAssetHelper to read model mesh information for actors too.

This commit is contained in:
moraaar
2021-04-16 18:24:29 +01:00
parent 41eadd60e4
commit 808fd1d3ba
6 changed files with 41 additions and 67 deletions
@@ -14,11 +14,17 @@
#include <Utils/MeshAssetHelper.h>
#include <Integration/ActorComponentBus.h>
namespace NvCloth
{
MeshAssetHelper::MeshAssetHelper(AZ::EntityId entityId)
: AssetHelper(entityId)
{
EMotionFX::ActorInstance* actorInstance = nullptr;
EMotionFX::Integration::ActorComponentRequestBus::EventResult(
actorInstance, entityId, &EMotionFX::Integration::ActorComponentRequestBus::Events::GetActorInstance);
m_supportSkinnedAnimation = actorInstance != nullptr;
}
void MeshAssetHelper::GatherClothMeshNodes(MeshNodeList& meshNodes)