# The server don't play animations if there is no one to watch it

**URL:** <https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Multiplayer, question\
**Created:** [October 22, 2023, 10:33pm UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213 "2023-10-22T22:33:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 22, 2023, 10:33pm UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/1 "2023-10-22T22:33:42Z")

</div>

I have problems with the position of the weapon.  
I think it’s because the server is not playing any animations. To save CPU and memory i guess, because there is no one to watch the animation.

This is causing problems to me.  
Because my character is in “Idle” in the server wolrd while in the client world it is in a weapon position.

So the weapon is in different places at same time and i can not spawn projectiles well.

Then I need the server to play the animations even if there is not one to watch it.  
How do I do this?  
Or any alternative solution?

Thank you so much!!

* * *

NOTE: The problem happend only when the server is not watching the client character, otherwise all works well…

* * *

Edited:

I tested the default Third Person Project Too (Untouched), the same thing happend… so must be something normal ¿Or Not?..

Anyway I need the same weapon possition in the server… and the server character is not moving. ¿How to solve it?

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 23, 2023, 5:14pm UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/2 "2023-10-23T17:14:39Z")

</div>

I used the client weapon position to spawn the projectile on server… there is not other way if the server is not playing the animations.

If it is to increase the performance, i don’t know what is wors, if do not play animations or replicate an actor pointer. i would like to know it.

---

<div class="post-metadata">

**Author:** ![SteveRambo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteveRambo](https://forums.unrealengine.com/u/SteveRambo)\
**Post date:** [October 23, 2023, 8:51pm UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/3 "2023-10-23T20:51:10Z")

</div>

I am on UE 5.2.1. I see what you mean. However, my animations are still playing on their own instances even off screen (on client and server). But the bizarre behavior is if I add a print string and print a replicated variable, such as player pitch, it will not print the correct value. Even though the information is correctly updating, it will only print the pitch value when the player is on screen (or very close to being on screen) to the other player. A copy of the animation blueprint is shown only in that case, evident by the print string appearing on screen, then going off screen when the player is off screen of the other player. I am not sure why this is happening. Doesn’t make much sense to me why the pitch value would update correctly, but not print the correct value inside the animation BP.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 1:10am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/4 "2023-10-24T01:10:38Z")

</div>

I’m using 5.3.1 now  
i didn’t realize this behavior before and i’m using Unreal since the 4.27 version.

The test must be done “Playing as Client” or “Playing as Listen Server” but in this case where the payer host can not see the client.

I belive the engineers progamed it like this because the perfomance. It can has sense, if no one can see the animation then maybe is better do not playing it because the skeleton has a lot of bones to caculate its movement. So i think in this case they only update the Transform (Location, Rotation and Scale).

But it is a pain for programers. First because i spent three days to know this (and what a headche, i almost become crazy). You was the only one helped me. ❤  
And second because now i can not trusth in the server values.

Afortunately i fixed my code easy and now it works well. But i replicaded a actor pointer. I would like to know how many bytes are sending through the network each time i´ll change this variable… 8 bytes? Or the entire size of the class?. Becase the first case is Ok. But the second case mabye i must to do it in other way.

---

<div class="post-metadata">

**Author:** ![SteveRambo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteveRambo](https://forums.unrealengine.com/u/SteveRambo)\
**Post date:** [October 24, 2023, 1:15am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/5 "2023-10-24T01:15:19Z")

</div>

I’ve never really noticed this before because I never had issues with the animations, and anytime I would use projectiles I would spawn them from a fixed location attached to the character root, like the capsule with an offset, rather than a bone. There has to be some way to override this behavior though in c++ at least. I’ve never looked into it.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 1:38am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/6 "2023-10-24T01:38:53Z")

</div>

I also thought that. I was looking for information about it and couldn’t find anything. I hope that someone who knows how to do it reads this post and teaches us how to do it. That would be great.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 4:20am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/7 "2023-10-24T04:20:18Z")

</div>

This is a nightmare.

I have a laser gun. When a client shoots another client within the host’s field of vision I can apply damage and see the particle system.

But if the shooter is not in the host’s field of vision, the laser cannot be seen nor can it inflict damage.

I mean, seems like in the server world only happen things when the server is watching.

That’s crazy.

Now i think my bones theory is wrong…

This must be the biggest bug in the Unreal history.

I don’t know what can i do… i can not work like this.

---

<div class="post-metadata">

**Author:** ![SteveRambo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteveRambo](https://forums.unrealengine.com/u/SteveRambo)\
**Post date:** [October 24, 2023, 4:32am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/8 "2023-10-24T04:32:59Z")

</div>

I don’t have any of those issues, are you sure you are spawning all the actors on the server and giving them the correct ownership?

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 4:36am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/9 "2023-10-24T04:36:29Z")

</div>

i think so… i’m using the default game mode in a empty Level… basicly i’m doing nothing

![Sin título](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/a/6ca37b4dcb050c63f9ae8ab51dd39a9cd5142c0c.png)

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 4:55am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/10 "2023-10-24T04:55:43Z")

</div>

Look this:

When the client is far away from the server field of vision can not apply damage

When the client is far away from the server field of vision, the server can not see the laser.

---

<div class="post-metadata">

**Author:** ![SteveRambo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteveRambo](https://forums.unrealengine.com/u/SteveRambo)\
**Post date:** [October 24, 2023, 6:58am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/12 "2023-10-24T06:58:59Z")

</div>

By the way, when you click on the mesh component in the player character, there is a setting called “Visibility Based Anim Tick Option”. The default is to only tick pose when rendered, but you can change this to always tick pose, or always tick pose and refresh bones. See if that helps you at all, but honestly it will probably be a big performance loss.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 7:15am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/13 "2023-10-24T07:15:43Z")

</div>

it Is not the distance… it is if the server can see the client or not… when the server see the client all work fine.

Thanks for the tips… i wil try it

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 7:18am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/14 "2023-10-24T07:18:14Z")

</div>

i will try it.  
Thank you so much!!

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 24, 2023, 8:08am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/15 "2023-10-24T08:08:56Z")

</div>

This fixed everything.

 ![ok](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/d/e5d768fbfdea88d5e0453c126b4a740c61d82674.png)

Now even the animations in server side are playing (Anim instance).

The only question I have now is if this is temporary (some version 5.3.1 bug).  
I guess we will have to wait for version 5.3.2 to find out.

I think the nightmare is over!!  
You Rock!!! I love you so much!!! ❤ ❤ ❤

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [November 23, 2023, 8:08am UTC](https://forums.unrealengine.com/t/the-server-dont-play-animations-if-there-is-no-one-to-watch-it/1341213/16 "2023-11-23T08:08:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
