# Mesh SetRelativeLocation is not working in network

**URL:** <https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 4, 2015, 8:49am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372 "2015-05-04T08:49:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [May 4, 2015, 8:49am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/1 "2015-05-04T08:49:21Z")

</div>

I’m not sure if this is a bug.

I use UE 4.7.4

 ![41209-b1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/4/b345844adcdf21f070c45e61bbb7338a53641f7a.png)

I have a Character like upper.

CapsuleComponent Half Height and Radius is dynamic. (From CSV DataTable)

Setting Half Height and Radius is OK.

second step , I set Mesh Location to match Half Height.

It’s OK to set mesh Location in Single-player Mode ,but not working in Multiplayer Mode .  
(Dedicated server)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [May 4, 2015, 10:12pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/2 "2015-05-04T22:12:34Z")

</div>

Hi KONADEV,

Can you show us Blueprint you’re using to set Half Height and Radius, and Mesh Location? Thanks!

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [May 5, 2015, 4:25am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/3 "2015-05-05T04:25:45Z")

</div>

Hi ,

 ![41349-b1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/4/4e47144a9e3197fb6561bde9eaba2ec2aa870cac.png)

I’m making a MMORPG.

I have a Spawn Point.  
It spawns NPCs by CSV Data.

![41350-b2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/9/3590fe6b9fe21f3307d3bc54c0eac988d18ae682.png)

NPC have a RepNotify Variable “NpcID”. (like Upper)

Spawn Point create NPC and set “NpcID”.

 ![41351-b3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/0/160d5b170e54e5d49ba62ec639343b13a985a9fe.png)

I Overridable “OnRep\_NpcID” to update NPC Data. (like Upper)

 ![41352-b4.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/d/c1da728de6daa71aa44c58725f1f16261c9f82cd.png)

I set Mesh Location to match CapsuleComponent.  
But Mesh Location be reset by engine in next tick.

I doubt this is relative with “Replicate Movement”.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [May 5, 2015, 7:07pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/4 "2015-05-05T19:07:34Z")

</div>

Is there a reason you’re using Set Relative Location only on Mesh? This would separate it from root capsule. Otherwise, I don’t really see what you’re seeing (though resulting move of Set Relative Location for a component does not seem to be replicating, which I will probably enter a bug report for).

reason I ask is because you might be better off using Add Actor World Offset node instead to move entire Character Actor, rather than only its Mesh. This also replicates properly, so it might be your best option at this point.

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [May 6, 2015, 7:09am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/5 "2015-05-06T07:09:17Z")

</div>

Thank you for your reply. Haliday.

I do not want to move Actor.  
I just want to modify mesh location to correspond with capsule’s bottom.

For example.  
Capsule Half Height is 200.

 ![41527-b5.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/6/b164931bb8ff3f4ad736f026755c72ade92be6df.png)

I need to adjust mesh location(z = -200) to fit Capsule’s bottom.  
Otherwise , It will looks like floating in air.

But Mesh Location will be reset to original value which is set in editor after next tick.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [May 6, 2015, 9:02pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/6 "2015-05-06T21:02:12Z")

</div>

Thanks for clarification! I see what you’re trying to do now, and that makes sense. I can’t reproduce exactly what you’re seeing, though: when I use Set Relative Location on a skeletal mesh inside a Character Blueprint, it doesn’t replicate this change in 4.7. I tested in 4.8, however, and results of Set Relative Location on a component replicates as expected.

You will, however, need to do change on Server and not Clients. Making this change on Client will only make that change on that Client, because replication only works from Server to Client and not in reverse. You can use and RPC call to update Server with this change, or you can make change on Server and it will automatically replicate to Clients.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [May 7, 2015, 2:59am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/7 "2015-05-07T02:59:18Z")

</div>

Thanks , I will try it in 4.8 🙂

---

<div class="post-metadata">

**Author:** ![JoeWintergreen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joewintergreen/32/1194565_2.png) [@JoeWintergreen](https://forums.unrealengine.com/u/JoeWintergreen)\
**Post date:** [August 20, 2015, 3:57am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/8 "2015-08-20T03:57:35Z")

</div>

I’m still having this on 4.8.3, trying to do pretty much exact same thing - my crouch changes capsule size so I need to change relative location of mesh to compensate. It works fine on server, but I can’t make change show up on client regardless of where I try to do it - server, multicast, etc. Is relative location of a character’s skeletalmeshcomponent supposed to be replicated, such that I should only need to set it on server? Either way doesn’t work.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [August 25, 2015, 5:00pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/9 "2015-08-25T17:00:09Z")

</div>

Hi ,

Can you set up a small test project that displays this behavior for me and upload it somewhere I can access? Otherwise, a complete set of reproduction steps in a new project would be helpful. Thanks!

---

<div class="post-metadata">

**Author:** ![DwunkyPengy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DwunkyPengy](https://forums.unrealengine.com/u/DwunkyPengy)\
**Post date:** [August 27, 2015, 9:49pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/10 "2015-08-27T21:49:33Z")

</div>

You can replicate this problem by simply starting a new third person character and try to change relative location of a skeletal mesh post construction, i can get this to work by deactivating character movement component but moment it gets reactivated character snaps back to default relative location 😕

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [August 31, 2015, 4:01pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/11 "2015-08-31T16:01:03Z")

</div>

Hi DwunkyPengy,

I just tried to reproduce this, and I didn’t have any trouble with Set Relative Location on Skeletal Mesh in ThirdPersonCharacter not replicating properly in 4.8.3. If you’re able to reproduce this in a new project, please upload it somewhere and post a link so I can take a look at setup that’s causing a problem for you. Thanks!

---

<div class="post-metadata">

**Author:** ![DwunkyPengy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DwunkyPengy](https://forums.unrealengine.com/u/DwunkyPengy)\
**Post date:** [September 1, 2015, 8:04pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/12 "2015-09-01T20:04:03Z")

</div>

> **[Dropbox - Error](https://www.dropbox.com/s/zu8bodnepgv4nkh/ReplicationTest.?dl=0)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

If you press G you can see shift, problem is client can see neither server nor other clients change. server however can see everyone just fine. Thanks for taking a look 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [September 2, 2015, 4:28pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/13 "2015-09-02T16:28:34Z")

</div>

Ah, I see it now. Thank you for project! Looks like I was setting up my test incorrectly in 4.8 and it wasn’t actually replicating there, either.

I was able to reproduce this in a clean project in 4.8.3 as well as 4.9.0 and our internal builds, so I’ve created a bug report for issue (UE-20681). I’ll post here when I see any update. Thanks again!

---

<div class="post-metadata">

**Author:** ![DwunkyPengy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DwunkyPengy](https://forums.unrealengine.com/u/DwunkyPengy)\
**Post date:** [September 4, 2015, 9:39pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/14 "2015-09-04T21:39:05Z")

</div>

Awesome, glad to see it wasn’t just me 😃 Keep me posted, its last big bug before we can release 🙂

---

<div class="post-metadata">

**Author:** ![DwunkyPengy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DwunkyPengy](https://forums.unrealengine.com/u/DwunkyPengy)\
**Post date:** [September 8, 2015, 3:01am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/15 "2015-09-08T03:01:29Z")

</div>

Ok, so as a workaround i just duplicated skeletal mesh, then set original one to hidden in game and am able to replicate set relative offset with my duplicate. So that might help anyone out waiting for an official fix 😃

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4ec72694](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4ec72694](https://forums.unrealengine.com/u/anonymous_user_4ec72694)\
**Post date:** [September 10, 2016, 12:36am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/16 "2016-09-10T00:36:54Z")

</div>

I came across same problem. We have characters that changes form including size of capsule which meant changing relative location of mesh so its flush with capsule. In a network game set relative location doesn’t work even if called on all clients. reason being is character movement component keeps a record of relative location at beginning and reuses value when doing movement smoothing. We solved issue by rerecording of relative location when we change it through code. If you don’t have access to code then there are 2 other solutions. 1. if relative location is constant then you can call set relative location every tick. or 2. Set Network Smoothing mode to Disabled which can be found in character movement component in blueprint. Hope that helps!

---

<div class="post-metadata">

**Author:** ![Flakky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/flakky/32/918696_2.png) [@Flakky](https://forums.unrealengine.com/u/Flakky)\
**Post date:** [September 19, 2016, 8:58pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/17 "2016-09-19T20:58:18Z")

</div>

I still do have this issue in 4.11. Do not know why, but mesh is trying to reach it’s original position every tick on client side. I can move it on server, and it does move. But as soon as I try to move it on client, it start to move back toward orig. loc. every tick.

Have no idea, what to do. Right now I’m going to solve this problem by hiding mesh and spawn a new one as another Actor. But this is really bad.

Does anyone fond a workaround of that?

---

<div class="post-metadata">

**Author:** ![Flakky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/flakky/32/918696_2.png) [@Flakky](https://forums.unrealengine.com/u/Flakky)\
**Post date:** [September 19, 2016, 9:01pm UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/18 "2016-09-19T21:01:52Z")

</div>

By way. It does work Sometimes. Thats is very weird.

I have this situation here… I must change mesh’s location 5 times. First 2 times it does not work. But after it does work. Always…

Why is this happening?

---

<div class="post-metadata">

**Author:** ![JoeWintergreen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joewintergreen/32/1194565_2.png) [@JoeWintergreen](https://forums.unrealengine.com/u/JoeWintergreen)\
**Post date:** [September 20, 2016, 1:16am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/19 "2016-09-20T01:16:08Z")

</div>

Still present in 4.13 ya’ll.

---

<div class="post-metadata">

**Author:** ![Flakky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/flakky/32/918696_2.png) [@Flakky](https://forums.unrealengine.com/u/Flakky)\
**Post date:** [September 20, 2016, 8:44am UTC](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372/20 "2016-09-20T08:44:06Z")

</div>

I found reason, why this is happening…

That is because Character’s Movmenet component and its network prediction and smoothness logic.

To get rid of that, try to disable “Network Smoothing Mode” inside character mov. component. That shold stop tick interpolation of mesh toward it’s original position.

Helped me in 4.11

[Next page](https://forums.unrealengine.com/t/mesh-setrelativelocation-is-not-working-in-network/317372.md?page=2)
