Announcement

Collapse
No announcement yet.

Instanced static mesh replication

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Instanced static mesh replication

    So I am building a floor out of instanced static meshes. And the floor have two integers x and y, wich determines its size. Both are exposed on spawn.
    So I click key "5" and it sends my location to an execute on server event in thirdpersoncharacter. Wich spawns the floor actor and inputs the x, y variables.

    Now the client always sees the floor spawn with its default size wich is x = 2 y = 2. While the host always see the correct floor.
    So why doesnt the client see the same thing as the server? The input of variables is done on server and the spawned actor is replicated, so is all its instanced components :S

    #2
    Are the x & y variables replicated? You may be sending/replicating the actor without the updated x & y values. To save on info size going to and from servers, only variables that are marked for replication are sent. So even if 5 is on server, 2 will be on client. If you click on the variable you should be presented with the option to replicate it or not in the details panel.

    https://docs.unrealengine.com/latest...1_3/index.html

    Here it is explained more eloquently.

    Comment


      #3
      Hey there, yes I tried something that I felt have to work. So you press "5" controller calls a local event in your pawn, wich calls an execute on server event. On the server, I set two replicated variables x and y, manually before testing to a fixed value (32 atm).
      These 2 variables now get passed to an event in the spawned floor, this event generates the total amount of components.

      I feel because the replicated variables are set on server, and sent to an actor wich was spawned on server, everyone should be aware of the change. But seems like not :S

      EDIT: Swapped the spawned actor from an instanced mesh, to a regular mesh actor. And it spawned and is replicated to everyone. So clearly the issue is replicating instanced static meshes.
      Only way so far to make server and client see an identical floor is to use a multicast for me.
      But correct me if im wrong, a replicated actor spawned on server, should be seen by everyone?
      Last edited by herruber; 12-16-2015, 01:40 PM.

      Comment

      Working...
      X