# How to send rotation information to Server and back to other clients in range?

**URL:** <https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, turning, unreal-engine, question\
**Created:** [November 8, 2016, 7:11pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780 "2016-11-08T19:11:33Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![GFA-SkyRanger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GFA-SkyRanger](https://forums.unrealengine.com/u/GFA-SkyRanger)\
**Post date:** [November 8, 2016, 7:11pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/1 "2016-11-08T19:11:33Z")

</div>

Hi!

I have trouble in how understanding, the network replication thing.  
Well, i know the principe of it.

But there arelot of Tutorials on YT but not a singel one explains, how exactly i have to program the rotation of the player, to send it through the server.

They all seemes to have the auromatic rotation enabled, which is for me not usable, because i want to use strafe left/right, so the Char schould not turn into move direction.

i got all my movement ready to work at all, but it wont turn on other clients. They see me walking back, even if i am walking forward.

How can i fix this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 8, 2016, 7:29pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/2 "2016-11-08T19:29:12Z")

</div>

Can you show some screenshots of the problem and your code? This will help me narrow dawn a solution

---

<div class="post-metadata">

**Author:** ![GFA-SkyRanger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GFA-SkyRanger](https://forums.unrealengine.com/u/GFA-SkyRanger)\
**Post date:** [November 8, 2016, 7:58pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/3 "2016-11-08T19:58:30Z")

</div>

I have made a short video, its better to see, what i mean.  
My Code is just to move the character.  
Turning, with right mousebutton or both mousekeys or q/e and strafe with a/d and forwad/backward with w/s or forward with both mousekeys, turn camera with leftklick n hold. I plan to implement “go there if klicked”. but later if network at all works.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/b/d7b5c42c096f0419dc5fecea04d4e4988a8d1ad9.jpeg "2016 11 08") ](https://www.youtube.com/watch?v=EgSo2MEQbkE)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 9, 2016, 7:11pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/4 "2016-11-09T19:11:50Z")

</div>

It says the video is private so I can’t see it D:

---

<div class="post-metadata">

**Author:** ![GFA-SkyRanger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GFA-SkyRanger](https://forums.unrealengine.com/u/GFA-SkyRanger)\
**Post date:** [November 9, 2016, 7:22pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/5 "2016-11-09T19:22:59Z")

</div>

My fault, repaired it. I would set it to “not listed”. sorry. its fixed.  
Would be nice, if you could help me with this. Otherwise it doesnt make sens, to go further in development on this game, if the foudation doesnt work.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 9, 2016, 7:39pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/6 "2016-11-09T19:39:57Z")

</div>

I’ll watch it right away

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 9, 2016, 7:45pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/7 "2016-11-09T19:45:56Z")

</div>

Ok. I see the problem and I understand what you want to achieve, but my question is about, how are you trying to achieve it? Did you turn off Replicate Movement in your character and you are handling it yourself by code? A screenshot of your code would really help me understand this better.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 9, 2016, 8:10pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/8 "2016-11-09T20:10:24Z")

</div>

I did a test and I think I got rotation working as you wanted. All I did was create a new Character class, copy the movement and mouse input logic from the third person character that comes with the template. Add a spring arm component with a camera component attached to it. And that was it. Please try this and tell me if it works.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 9, 2016, 8:21pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/9 "2016-11-09T20:21:52Z")

</div>

Take a look:

> **[5 Star HD Porn - Free Porn Tube & Sex Tube – HD Porn Videos & XXX Movies](https://www.5starhdporn.com/?utm_source=vidme)**
>
> Watch Free HD porn videos on the most popular porn tube in the world. Find hardcore porn of pornstars and milfs online. Stream porn your desktop or mobile.

---

<div class="post-metadata">

**Author:** ![GFA-SkyRanger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GFA-SkyRanger](https://forums.unrealengine.com/u/GFA-SkyRanger)\
**Post date:** [November 9, 2016, 8:36pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/10 "2016-11-09T20:36:43Z")

</div>

Ok, here are the screenshots.

 ![114399-image9.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/0/b707545b4ec62e46b807628fd674b27895b2084b.png)

---

<div class="post-metadata">

**Author:** ![GFA-SkyRanger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GFA-SkyRanger](https://forums.unrealengine.com/u/GFA-SkyRanger)\
**Post date:** [November 9, 2016, 8:48pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/11 "2016-11-09T20:48:53Z")

</div>

This seems like you are strafing, but others see you running in direction where you strafing. Thats not exactly what i want, but more, than i actually have. well i am trying, what u told me… but i have, as you can see in screenshot, a very special controlling of char. anyways, im traing …  
ill give you feedback if im done.

Did u deactivated “Orient Rotaion to Movement” ?  
I have to do that, to make my char movin like i want. and this turns off rotating at all, so i have to implement it by hand, and this is still deactivating rotation information to other clients. so nor thats the problem.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 9, 2016, 9:02pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/12 "2016-11-09T21:02:11Z")

</div>

> but others see you running in direction where you strafing. Thats not excactly what i want, but more

I don’t understand the behavior you are trying to achieve then. It would be good if you tried to describe this behavior you want differently or with a picture.

And yes. I deactivated Orient Rotation to Movement and as you can see rotation replication is still there

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d9aa7bc0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d9aa7bc0](https://forums.unrealengine.com/u/anonymous_user_d9aa7bc0)\
**Post date:** [November 9, 2016, 9:10pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/13 "2016-11-09T21:10:02Z")

</div>

Holly Molly that’s a lot of stuff. To be honest, to me all that code seems somewhat overcomplicated, but then again I still don’t completely understand what you are trying to achieve.

Look at the setup that I have for the video that I posted.

 ![114412-movement.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/a/eaa7ef25e2baf756979dcecc521ffef8024bba75.png)

That’s it. Input logic copied from the ThirdPersonCharacter template blueprint. A camera on a spring arm. Nothing else.

---

<div class="post-metadata">

**Author:** ![GFA-SkyRanger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GFA-SkyRanger](https://forums.unrealengine.com/u/GFA-SkyRanger)\
**Post date:** [November 9, 2016, 9:37pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/14 "2016-11-09T21:37:12Z")

</div>

Ah i understood the difference now.

Well, ill try to explain.  
In your case, you just move the X on mouse and you turn around, it means, the character turns around and the camera, too.

But i separated each other.  
I turn mouse with left’n hold mousebutton so the Chatacter still moves on autorun in same direction as before i turned the camera.

If i release the Mousebutton the camera still stays at my last direction i looked to. and the Char is running still same direction as he does before. My caera movin doesnt affect the walk direction.

If i have enabled autorun, i can turn around with right mousebutton.  
but all what will be go to other clients are the movementdirection, not the turn direction of my char.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2046231a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2046231a](https://forums.unrealengine.com/u/anonymous_user_2046231a)\
**Post date:** [November 9, 2016, 10:44pm UTC](https://forums.unrealengine.com/t/how-to-send-rotation-information-to-server-and-back-to-other-clients-in-range/375780/15 "2016-11-09T22:44:41Z")

</div>

I believe this is what he wants… If the player runs straight and starts to strafe there shouldnt be any rotation at all so the char stays pointing towards the target (for effectivly casting spells for example). and further he wants to know how to manually send this data trough the server.
