# Replication for moving actor

**URL:** <https://forums.unrealengine.com/t/replication-for-moving-actor/435476>\
**Category:** Character & Animation\
**Tags:** dedicated-server, Replication, bounce, unreal-engine, question\
**Created:** [October 12, 2018, 4:55am UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476 "2018-10-12T04:55:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SvarogZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SvarogZ](https://forums.unrealengine.com/u/SvarogZ)\
**Post date:** [October 12, 2018, 4:55am UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/1 "2018-10-12T04:55:38Z")

</div>

I have a dedicated server with two clients.

If one character has an impact with some actor, this actor is bouncing from the character to a new place.  
However, another client observes another new location of the object.  
It looks like each client calculates the bounce itself.

I want to have all the movements of an actor on the server with exact representation for all clients.  
I played with replication setpoints, but it gives nothing.

Please help with setting for replication. Maybe something else is wrong.

---

<div class="post-metadata">

**Author:** ![oeelis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@oeelis](https://forums.unrealengine.com/u/oeelis)\
**Post date:** [October 12, 2018, 8:18am UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/2 "2018-10-12T08:18:05Z")

</div>

If you are using the Static Mesh Actor as you physics objects parent class, you can set the “replicate movement” flag on for that actor. This should do all replication automatically.

---

<div class="post-metadata">

**Author:** ![SvarogZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SvarogZ](https://forums.unrealengine.com/u/SvarogZ)\
**Post date:** [October 12, 2018, 9:15pm UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/3 "2018-10-12T21:15:07Z")

</div>

Yes, It should, but not.  
It does not matter a dedicated server or not. Even if I use Server and Client, bouncing is different. My StaticMesh is in different locations for server and client after the bouncing.

Please see the picture with settings.

---

<div class="post-metadata">

**Author:** ![SvarogZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SvarogZ](https://forums.unrealengine.com/u/SvarogZ)\
**Post date:** [October 12, 2018, 10:07pm UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/4 "2018-10-12T22:07:35Z")

</div>

The same issue here

> **[Replicating Physics on Static Mesh](https://forums.unrealengine.com/questions/157063/view.html)**
>
> I am having difficulty trying to get my static meshes to replicate over the network. An example a player loots a can, drops a can and then bumps into the can. Well the can is in the same location to both players until the can is bumped by one player....

---

<div class="post-metadata">

**Author:** ![SvarogZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SvarogZ](https://forums.unrealengine.com/u/SvarogZ)\
**Post date:** [October 12, 2018, 10:39pm UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/5 "2018-10-12T22:39:30Z")

</div>

I’ve tried to switch off physics and collision for clients only, however, an actual location of the actor is not passing to the clients.

---

<div class="post-metadata">

**Author:** ![SvarogZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SvarogZ](https://forums.unrealengine.com/u/SvarogZ)\
**Post date:** [October 23, 2018, 1:14am UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/6 "2018-10-23T01:14:45Z")

</div>

I still cannot fix an issue.  
I’ve created the standard scene for the third person and activated replication for static meshes (cubes) and projectiles (balls) as per stream from Epic. It works as was shown. However, standard Actor with StaticMeshComponent doesn’t want to be replicated as regular StaticMesh.

1. If I use StaticMesh on the scene, everything is good. It replicates absolutely correctly.
2. If I use StaticMesh as Component for an Actor, it doesn’t work.

I’ve tried all combination for settings of replication for the Actor.  
I’ve tried switch-on replication for the root component and StaticMashComponent one by one and both together as well.  
I’ve tried to switch-off physics for Client only.  
It looks like something doesn’t work properly. Maybe it’s me.

Could you advise, how to use replication of movement for Actors with StaticMeshComponents?

---

<div class="post-metadata">

**Author:** ![SvarogZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SvarogZ](https://forums.unrealengine.com/u/SvarogZ)\
**Post date:** [October 23, 2018, 5:47pm UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/7 "2018-10-23T17:47:23Z")

</div>

I have found an interesting thing.  
If StaticMeshComponent has a physics it can be moved, however, root component and Actor **don’t move**. It means, if I bump the StaticMesh to another end of the world, physically Actor remains on the same place, where it was created.

I created two replicated variables for location and rotation and updated them if StaticMeshComponent changes the location, Every tick I changed a position of the Actor to be on the same place with the StaticMeshComponent. On the client, I’ve changed the position of StaticMeshComponent as well. This solution works, however, all movements on the client are not smooth enough.

I didn’t find a description for the option “replicate movement”. There is no visible effect from that option in my tests.

---

<div class="post-metadata">

**Author:** ![SvarogZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SvarogZ](https://forums.unrealengine.com/u/SvarogZ)\
**Post date:** [January 9, 2019, 5:59pm UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/8 "2019-01-09T17:59:05Z")

</div>

“replicate movement” works just for a root component.  
For this feature, StaticMeshComponent must be chosen as “root”.

If not, it is just changing location in reference to root component.

---

<div class="post-metadata">

**Author:** ![Schuveto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Schuveto](https://forums.unrealengine.com/u/Schuveto)\
**Post date:** [October 27, 2023, 7:37pm UTC](https://forums.unrealengine.com/t/replication-for-moving-actor/435476/9 "2023-10-27T19:37:40Z")

</div>

Thanks
