Im trying to make a multiplayer flying game. SO I garbed the Flying Example and well its a Pawn not a Character and for some reason it has no Client/Server Replication. So when you hit play with 3 players (1 server, 2 clients) The Clients can see the Server Fly just fine but the server doesn’t see them move nor do the clients see each other move. How do i fix this? I have been pulling my hair out with this. I started to try and make a Character BP and make it fly but it seems to be much harder then I thought. Please help me out!
Havnt done many things with BP client/servers and the like, but generally when programming (logically) you’ll push something to the server, then prompt on the client side to check if its there. And if it is, register it on the client side.
If memory serves their is a Epic tutorial on how to set up multiplayer with clients n the like. Ill try and find it and edit this post for you.
EDIT
Found it lol, its the first one on Youtube that you find after searching Unreal Engine 4 Multiplayer tutorial
I am working with Dante on this and we trying we watch all thos videos and what we have now is the client tells the server to move my pawn and does but its never in the right spot… lets say i land the ufo on client 1 on the blue flying word in the middle of the map and than i fly the 2nd client over to it the 1st client on the 2nd client screen will be a few feet off from where it is on its own screen. I would upload a pic but its not letting me upload it right now
Simulated Gravity
Can you write C++? There’s a ‘bug’ in the default implementation of the MovementComponent that automatically simulates gravity for all characters. For a flying character, you don’t want to simulate gravity. This is probably what you’re seeing. I had to fix this in my code, it’s not in front of me at the moment but I believe it’s bSimulateGravity. Unfortunately you can’t just set it to false and forget about it, because I think it’s overwritten during the move. I’m trying to do this from memory so forgive me if I have my names wrong.
What is the flying example? I could take a look… But I can’t find anything about “flying example”
EDIT: Found it… I’ll take a look tomorrow
Thanks guy we will keep working on it just no because its a pawn and not a character so i had to write a code to get to replicate on the server at all plus i already have it to fly just fine with the flying example but just not updating on the server right
There is a setting to turn on replication for pawns. Pretty sure it’s under Class defaults.
TheFoyer i wish it was that easy… Like I said we can replicate the pawn but its doesn’t replicate right. The positions are off lets say this if client 1 is flying thru a ring on the map client 2 sees that client 1 miss the ring even tho it didnt.