Replicate the Transform of BP Actor

OKAY: weird update, so I cahanged the code to this:

  • I am making sure that everything has a switch has authority node applied so only the host (server) is controlling the train.
  • I have replicates and replicates movement checked.
  • I am also now spawning the BP_Train in the world via the level blueprint with a switch has authority node aswell.

What i’ve found out is that the client cant see the train, but it can ride it (but the client only gets notified of their position, being where the train is, when they jump) The client can also see spiders that have landed on top of the train, but cant see the train so its just spiders in the air moving along the track but the host confirms that they are just on top of the train.

Takeaway is: the train seems to be replicating, to some extent… but the actual BP_Train is invisible for the client. Maybe I need to take away the Switch Has Authority node in the level bp where the train is spawned, I’m not sure :question:

Edit: I removed the Switch Has Authority node in the level bp, to my surprise (at this stage) the client saw the train, there seemed to be a little lag in location, it seemed to pull up at the train stop first for the host, followed by the clients train (this could also be the time difference in when the clients game loads) will try a few more times to clarify

Edit: So, they definitely arrive at different times, the host sees the train arrive and then the client sees its version of the train arrive 2 seconds later. They both board the train in its stopped position but since the host is ahead… on the clients screen the host is on the invisible train ahead of the clients train, the host however, sees the client next to them. Totally out of sync, I’m going to post a video to show whats happening more clearly