Can you show some screenshots of the problem and your code? This will help me narrow dawn a solution
How to send rotation information to Server and back to other clients in range?
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?
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.
It says the video is private so I can’t see it D:
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.
I’ll watch it right away
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.
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.
Take a look:
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.
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
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.
That’s it. Input logic copied from the ThirdPersonCharacter template blueprint. A camera on a spring arm. Nothing else.
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.
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.