# How to get vertices positions for cloth simulation?

**URL:** <https://forums.unrealengine.com/t/how-to-get-vertices-positions-for-cloth-simulation/469735>\
**Category:** World Creation\
**Tags:** clothing, vertex-position, procedural-mesh-comp, unreal-engine, procedural, question\
**Created:** [August 14, 2020, 5:55am UTC](https://forums.unrealengine.com/t/how-to-get-vertices-positions-for-cloth-simulation/469735 "2020-08-14T05:55:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kibblesticks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kibblesticks](https://forums.unrealengine.com/u/Kibblesticks)\
**Post date:** [August 14, 2020, 5:55am UTC](https://forums.unrealengine.com/t/how-to-get-vertices-positions-for-cloth-simulation/469735/1 "2020-08-14T05:55:13Z")

</div>

I’m trying to get the vertices positions of a cloth simulation so I can build a procedural mesh from a sim at runtime. Any ideas on how to do this?

---

<div class="post-metadata">

**Author:** ![nameLive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nameLive](https://forums.unrealengine.com/u/nameLive)\
**Post date:** [May 6, 2022, 8:11pm UTC](https://forums.unrealengine.com/t/how-to-get-vertices-positions-for-cloth-simulation/469735/2 "2022-05-06T20:11:19Z")

</div>

Here you go 🙂

You prob need to include several things for the SkeletalMeshLODRenderData etc.

const FSkeletalMeshLODRenderData& skelMeshRenderDataTemp = skelComponent-\>GetSkeletalMeshRenderData()-\>LODRenderData[0];  
FSkinWeightVertexBuffer& skinWeightBufferTemp = \*skelComponent-\>GetSkinWeightBuffer(0);

```
		if (skelMeshRenderDataTemp.HasClothData()) {

			// UE_LOG(LogTemp, Warning, TEXT("Has Cloth"));

			
			// Cloth Positions if ever needed
			/*
			auto currentClothingData = skelComponent->GetCurrentClothingData_AnyThread();
			TArray<FClothSimulData> clothSimulData;
			currentClothingData.GenerateValueArray(clothSimulData);

			for (auto simulDataTest : clothSimulData) {

				// simulDataTest.Positions
				// simulDataTest.Normals

				for (auto simulDataPosTest : simulDataTest.Positions)
					UE_LOG(LogTemp, Warning, TEXT("pos: %s"), *simulDataPosTest.ToString());
			}
			*/
		}
```

---

<div class="post-metadata">

**Author:** ![dandingol03](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dandingol03/32/769404_2.png) [@dandingol03](https://forums.unrealengine.com/u/dandingol03)\
**Post date:** [October 31, 2023, 9:06am UTC](https://forums.unrealengine.com/t/how-to-get-vertices-positions-for-cloth-simulation/469735/3 "2023-10-31T09:06:53Z")

</div>

@Kibblesticks have you tried the method `nameLive` mention? Does it work?

---

<div class="post-metadata">

**Author:** ![dandingol03](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dandingol03/32/769404_2.png) [@dandingol03](https://forums.unrealengine.com/u/dandingol03)\
**Post date:** [November 7, 2023, 8:12am UTC](https://forums.unrealengine.com/t/how-to-get-vertices-positions-for-cloth-simulation/469735/4 "2023-11-07T08:12:02Z")

</div>

`HasClothData` always return false in ue 5.3.1. I use panel cloth editor to construct my clot h asset and put it under the human skeletalmeshcomponent
