# Modify existing mesh's position of vertices

**URL:** <https://forums.unrealengine.com/t/modify-existing-meshs-position-of-vertices/339687>\
**Category:** Asset Creation\
**Tags:** vertices, unreal-engine, question\
**Created:** [November 25, 2015, 7:32pm UTC](https://forums.unrealengine.com/t/modify-existing-meshs-position-of-vertices/339687 "2015-11-25T19:32:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.Mechanical](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr.Mechanical](https://forums.unrealengine.com/u/Mr.Mechanical)\
**Post date:** [November 25, 2015, 7:32pm UTC](https://forums.unrealengine.com/t/modify-existing-meshs-position-of-vertices/339687/1 "2015-11-25T19:32:06Z")

</div>

I am working on transferring my Unity soft-body physics project to Unreal 4. I need to be able to modify the position of vertices on an existing mesh. I know I can’t use the static mesh component since my mesh will be constantly deforming during runtime. Any suggestions?

---

<div class="post-metadata">

**Author:** ![epernod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@epernod](https://forums.unrealengine.com/u/epernod)\
**Post date:** [September 29, 2017, 2:33pm UTC](https://forums.unrealengine.com/t/modify-existing-meshs-position-of-vertices/339687/2 "2017-09-29T14:33:40Z")

</div>

Hi,

I was looking at the same question, here is what I found, if you still need it of for future searcher:  
I use a UProceduralMeshComponent.

The creation:

```
VisualMesh::createMesh()
{
   mesh = CreateDefaultSubobject<UProceduralMeshComponent>(TEXT("GeneratedMesh"));
RootComponent = mesh;

// Create buffers
TArray<FVector> vertices;
TArray<int32> Triangles;
TArray<FVector> normals;
TArray<FVector2D> UV0;
TArray<FProcMeshTangent> tangents;
TArray<FLinearColor> vertexColors;

// Fill buffers
...

// Create mesh
mesh->CreateMeshSection_LinearColor(0, vertices, Triangles, normals, UV0, vertexColors, tangents, true);

}

```

The update:

```
TArray<FVector> vertices;
	TArray<FVector> normals;
	for (int i = 0; i < nbrV; i++)
	{
		vertices.Add(FVector(newX, newY, newZ));
		normals.Add(FVector(newX, newY, newZ));
	}
	
	mesh->UpdateMeshSection(0, vertices, normals, TArray<FVector2D>(), TArray<FColor>(), TArray<FProcMeshTangent>());
```
