Multiplayer Sync Item Drop Locations

In my multiplayer game whenever a player dies they have a chance of dropping a small health or ammo pack. To add some flair I want the item to jump out rather than drop straight down with gravity. My problem is the actors do not land in the same location on the client or server. I can not figure out how to sync them; I’ve tried Replicates & Replicates Movement but saw no change. I’ve also tried Teleport or Set Actor Location and the actor does not move on the server nor the clients.

nope. The item travels like a projectile but the location sync is still incorrect. I made sure it had Replicates and Replicates Movement

edit: when I have time later today I’m going to take a projectile I have in my game that does sync, copy it and convert it into this item drop to see if it syncs.

add a projectile component to the item Blueprints. Set the projectile component to replicate and then setup the projectile component to launch up and fall… should replicate just fine Provided your replication is setup fine.

You will avoid all this random number gen stuff which i suspect is the cause of your issue.

Also i Noticed your Multi casting it.

Keep in mind.

For some reason I had to duplicate a functioning projectile blueprint to get this answer to work. I was unable to get any syncing by adding Projectile Movement to the Actor in the opening question. I instead duplicated the First Person Template projectile which is the yellow bouncing ball. Added in my custom static meshes and materials, ect. and it works.

Furthermore I managed to rework the flair effect. Now that the Actor has Projectile Movement I simply adjusted the Spawn Actor rotation. The Health drop spawns at the location of the Pawn with a projectile velocity of 600. The random integer (picture below) adjusts the direction of the projectile from 0 degrees to 180 degrees. Within the Health Drop Actor itself at Begin Play, set actor rotation to Pitch (Y) 0 so the object no longer has a slant from the SpawnActor rotation.

As for the Multi Casting in my original blueprint, I did that originally thinking that it was not possible for a desync to happen if the server and clients all added the same value to the Add Force Node. Unfortunately that was not entirely true…the point in time that the Add Force is applied is different across all computers due to lag or however else the math is not done exactly the same.

Glad I Could Help