# Setting bone positions using C++

**URL:** <https://forums.unrealengine.com/t/setting-bone-positions-using-c/343105>\
**Category:** Character & Animation\
**Tags:** bone-transform, unreal-engine, CPP, question\
**Created:** [January 4, 2016, 9:44pm UTC](https://forums.unrealengine.com/t/setting-bone-positions-using-c/343105 "2016-01-04T21:44:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kraghot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kraghot](https://forums.unrealengine.com/u/kraghot)\
**Post date:** [January 4, 2016, 9:44pm UTC](https://forums.unrealengine.com/t/setting-bone-positions-using-c/343105/1 "2016-01-04T21:44:28Z")

</div>

Hi,  
for my project I am trying to use shared memory to pull floats which I will use to set my characters bone position. What would be the best way to go about doing that. I have already created a class which pulls the information from the shared memory, but I can’t find a way to apply those transformations to my character. What would be the best way to go about doing that?  
I have tried to google around, but I am confused as to where to put the code provided and was hoping someone could provide me some input.

Thanks everyone in advance

---

<div class="post-metadata">

**Author:** ![rantrod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rantrod](https://forums.unrealengine.com/u/rantrod)\
**Post date:** [January 5, 2016, 12:08am UTC](https://forums.unrealengine.com/t/setting-bone-positions-using-c/343105/3 "2016-01-05T00:08:06Z")

</div>

If you want to manipulate bones directly through C++, your character needs to derive from UPoseableMeshComponent instead of USkeletalMeshComponent. Here’s an answer which might help:

> **[Transform skeletal bone in C++](https://forums.unrealengine.com/questions/59010/transform-skeletal-bone-in-c.html)**
>
> Hello! Is there way to transform bone of ASkeletalMeshActor? I tried to do it following ways: (SkeletalMeshComponent from actor instance) by changing SpaceBases and LocalAtoms for required bone auto BoneIdx =...

EDIT: UPoseableMeshComponent::SetBoneLocationByName might help you with that
