# Getting the world position of skeletal mesh vertex

**URL:** <https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765>\
**Category:** World Creation\
**Tags:** physics-constraint, vertex-position, unreal-engine, Physics, skeletalmesh, CPP, question\
**Created:** [March 2, 2017, 10:33pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765 "2017-03-02T22:33:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f01eb23a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f01eb23a](https://forums.unrealengine.com/u/anonymous_user_f01eb23a)\
**Post date:** [March 2, 2017, 10:33pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/1 "2017-03-02T22:33:20Z")

</div>

I’ll try and make this as clear as possible. I need to get the world coordinates of each vertex in a skeletal mesh. The mesh in question has physics enabled and twists, flexes and breaks under force. Because of this I need to get the vertex’s world position resulting from all of the meshes transformations. Thus far i’ve only been able to find this([Accessing Vertex Positions of static mesh - C++ - Epic Developer Community Forums](https://forums.unrealengine.com/showthread.php?8856-Accessing-Vertex-Positions-of-static-mesh)) method for getting this data for a static mesh. Any help towards this goal is much appreciated

---

<div class="post-metadata">

**Author:** ![OzMomotaro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OzMomotaro](https://forums.unrealengine.com/u/OzMomotaro)\
**Post date:** [April 19, 2021, 12:48pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/2 "2021-04-19T12:48:48Z")

</div>

Did you ever get an answer to this?

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [July 30, 2021, 10:18pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/3 "2021-07-30T22:18:01Z")

</div>

I have been trying to figure this out for months. I’ve chased so many dead ends, found unanswered posts, and the occasional “just paste this” answer that doesn’t seem to work.  
In case anyone finds this I am going to start posting any progress I make until I get it solved or someone takes pity on me and posts the correct answer.  
**Lets start with baby steps:  
The code below just creates a node with inputs for a skeletal mesh and an integer and a vector output.  
It does not return actual vertex positions yet**

```
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Components/SkeletalMeshComponent.h"
#include "MyBlueprintFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class NEWCPPTESTING_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
    GENERATED_BODY()

        UFUNCTION(BlueprintCallable, Category = "SkeletalMeshStuff")
        static FVector GetVertexPosition(USkeletalMeshComponent* MyComponent, int32 MyVertexIndex);
};

```

.h file

```
// Fill out your copyright notice in the Description page of Project Settings.

#include "Components/SkeletalMeshComponent.h"
#include "MyBlueprintFunctionLibrary.h"

FVector UMyBlueprintFunctionLibrary::GetVertexPosition(USkeletalMeshComponent* Comp, int32 VertInd)
	 
{ 
	FVector MyVector = FVector (25.f, 27.f, 29.f);

	return MyVector;
	}

```

.cpp file

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [July 30, 2021, 10:27pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/4 "2021-07-30T22:27:04Z")

</div>

![345289-blueprint-setup.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/5/b35fa6a42a82baba966cfd42aab8677d459af946.png)

![345290-print-vector.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/e/cfe4701f2439ee00be167061f820c130e0ff0b83.png)

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [August 2, 2021, 11:02am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/5 "2021-08-02T11:02:19Z")

</div>

**Making progress I think**

```
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Components/SkeletalMeshComponent.h"
#include "MyBlueprintFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class NEWCPPTESTING_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
    GENERATED_BODY()

        UFUNCTION(BlueprintCallable, Category = "SkeletalMeshStuff")
        static FVector GetVertexPosition(USkeletalMeshComponent* MyComponent, int32 MyVertexIndex);
};

```

.h file

```
// Fill out your copyright notice in the Description page of Project Settings.

#include "Components/SkeletalMeshComponent.h"
#include "Rendering/SkeletalMeshLODRenderData.h"
#include "Rendering/SkinWeightVertexBuffer.h"
#include "MyBlueprintFunctionLibrary.h"

FVector UMyBlueprintFunctionLibrary::GetVertexPosition(USkeletalMeshComponent* Component, int32 VertexIndex)
	 
{ 
	// MyVector = FVector (25.f, 27.f, 29.f);
	FSkeletalMeshLODRenderData Model;
	FSkinWeightVertexBuffer SkinWeightBuffer;
	FVector MyVector = USkeletalMeshComponent::GetSkinnedVertexPosition(Component,VertexIndex,Model,SkinWeightBuffer);

	return MyVector;
	}

```

.cpp file

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [August 2, 2021, 8:34pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/6 "2021-08-02T20:34:01Z")

</div>

Even though Virtual Studio shows no syntax errors, trying to compile results in unresolved externals errors.

 ![345468-unresolved-errors.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/5/bc5ca16a8ff126e3e8b67ff0cd8d32892025a7f1.png)

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [August 3, 2021, 3:32am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/7 "2021-08-03T03:32:56Z")

</div>

I found a post that said I had to make a couple changes in the (projectname).Build.cs file of my game.  
This file is located in the UnrealProjects(projectname)\Source(projectname)

 ![345489-folder-path.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/a/95a408e5855e665b37728592dc57cc0218463e6e.png)

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [August 3, 2021, 3:34am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/8 "2021-08-03T03:34:51Z")

</div>

Adding , “RHI”, “RenderCore” to the PublicDependencyModuleName line the code now compiles without errors.

 ![345490-add-rhi-rendercore.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/0/750a81af8ed0cb2a224428da55d3340d5cef5d4b.png)

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [August 3, 2021, 3:41am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/9 "2021-08-03T03:41:15Z")

</div>

![345501-lookmanoerrors.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/d/52d9fb0e95da6bd763fa298e410de34eff266701.png)

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [August 3, 2021, 10:15pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/10 "2021-08-03T22:15:02Z")

</div>

Even though there are no errors. It still crashes the editor when I try to pay the level.

 ![345567-add-blueprint.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/1/2b15f8c2ab3f256b7fe9a4f53d48011cf519e2a6.jpeg)

 ![345568-crash.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/6/aa6365265c4bb8edba66ddbd2ec70ab28b4e06b5.png)

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [October 8, 2021, 8:53pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/11 "2021-10-08T20:53:41Z")

</div>

So… I gave up. Well, gave up trying to figure this out myself anyway.  
I hired someone on Fiverr who got this working in a couple of days.  
They gave me permission to share the solution with the UE community.  
It is now available on myGithub page as an UE Plugin:

> **[GitHub - GNVR-Dev/UE\_Skeletal\_Mesh\_Vertex\_World\_Postions: Unreal Engine C++...](https://github.com/GNVR-Dev/UE_Skeletal_Mesh_Vertex_World_Postions)**
>
> Unreal Engine C++ Blueprint Function Library Plugin to return world postion of skeletal mesh vertex - GitHub - GNVR-Dev/UE\_Skeletal\_Mesh\_Vertex\_World\_Postions: Unreal Engine C++ Blueprint Function ...

Edited to give credit to Fiverr seller:  
Their username is cynorthwyydd. If you need any help fixing your C++ UE issues I would very much recommend.

---

<div class="post-metadata">

**Author:** ![GNVR\_DEV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GNVR\_DEV](https://forums.unrealengine.com/u/GNVR_DEV)\
**Post date:** [October 8, 2021, 9:10pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/12 "2021-10-08T21:10:49Z")

</div>

![350095-get-vectors-cropped.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/2/022f526352e4f35866f034782f572a451e36b916.jpeg)

 ![350096-blueprint-setup-working.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/7/667027f60e447d45e960943f203e31612da566c2.png)

---

<div class="post-metadata">

**Author:** ![dorusoftware](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dorusoftware](https://forums.unrealengine.com/u/dorusoftware)\
**Post date:** [July 12, 2022, 12:25pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/13 "2022-07-12T12:25:45Z")

</div>

Do you have this for unreal 5 or can you give me some ideas how to make it work? Placing this in the Library folder fails to compile or something.

I don’t have experience with all this

---

<div class="post-metadata">

**Author:** ![FunnyCharly](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/funnycharly/32/953985_2.png) [@FunnyCharly](https://forums.unrealengine.com/u/FunnyCharly)\
**Post date:** [February 22, 2023, 5:14am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/15 "2023-02-22T05:14:07Z")

</div>

Hello，thanks for sharing，one thing I want to ask you is could this plugin be applied on UE5？

---

<div class="post-metadata">

**Author:** ![FunnyCharly](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/funnycharly/32/953985_2.png) [@FunnyCharly](https://forums.unrealengine.com/u/FunnyCharly)\
**Post date:** [May 25, 2023, 6:09am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/16 "2023-05-25T06:09:56Z")

</div>

Hello,I want to ask the same question as you，did you success?

---

<div class="post-metadata">

**Author:** ![dorusoftware](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dorusoftware](https://forums.unrealengine.com/u/dorusoftware)\
**Post date:** [May 26, 2023, 8:53am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/17 "2023-05-26T08:53:26Z")

</div>

Yes, but it was pointless for me as I needed the position of a vertex with the blendshapes applied which it was not able to do unless you bake the mesh and get it out of the GPU which tanks the frame rate when accessing it. It works but it drops the frame rate and you can’t do it every frame.

I don’t recall where I put the code, it must be in some folder. If I remember correctly I’ve had to modify the code plugin to upgrade it to UE5

---

<div class="post-metadata">

**Author:** ![FunnyCharly](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/funnycharly/32/953985_2.png) [@FunnyCharly](https://forums.unrealengine.com/u/FunnyCharly)\
**Post date:** [June 8, 2023, 9:50am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/19 "2023-06-08T09:50:55Z")

</div>

In fact, I want to get all vertex locations of a metahuman face animation.You mean this plugin couldn’t do this,unless I bake the mesh and get it out of the GPU,right?

---

<div class="post-metadata">

**Author:** ![dorusoftware](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dorusoftware](https://forums.unrealengine.com/u/dorusoftware)\
**Post date:** [June 8, 2023, 2:47pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/20 "2023-06-08T14:47:30Z")

</div>

I’ve searched for the plugin with the changes I’ve made to make it work inside UE5 but I didn’t find it.

---

<div class="post-metadata">

**Author:** ![FunnyCharly](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/funnycharly/32/953985_2.png) [@FunnyCharly](https://forums.unrealengine.com/u/FunnyCharly)\
**Post date:** [June 9, 2023, 1:59am UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/22 "2023-06-09T01:59:56Z")

</div>

Could you please provide the source code of yours？

---

<div class="post-metadata">

**Author:** ![dorusoftware](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dorusoftware](https://forums.unrealengine.com/u/dorusoftware)\
**Post date:** [June 9, 2023, 1:10pm UTC](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765/23 "2023-06-09T13:10:58Z")

</div>

I didn’t find it, I was searching to post it here, I have so many archives of the project, looked at all those from that period but I didn’t found it. 🤷 🤬

[Next page](https://forums.unrealengine.com/t/getting-the-world-position-of-skeletal-mesh-vertex/386765.md?page=2)
