How to make shotgun instant hit spread

Talking about projectile physics would be derailing this thread a bit though. The conversation here seems to be about how to replicate multiple impact effects for a trace weapon.

13tisa13 - Yes I got it working, and managed to use shared random variables so that a random spread on the server is the same as a random spread on the client.

The basics of it are -
Have a call on your weapon that starts the firing procedure
Do the loop that traces from the weapon, and make sure to initialize using


 FFOwner->SynchronizeRandomStream();
FFOwner->InitializeRandomStream(); 

When you use the randomizers for your spread use -


RandStream.FRand();

When all thats done, set a flag saying that the fire effect happened that replicates to all the clients Have the clients start a firing effect, and run through the same loop (using the same stream and RandStream.FRand() this time drawing the effects of the traces rather than applying the damage.

The shooter game will have an example of getting the effect to fire on the client. When you find it, thats your hook to trigger the visual effects. If you want something more specific post up some code and we’ll work through it.

Logging is your friend when it comes to client/server debugging -
implement the stuff in this link and spread it liberally through your code https://wiki.unrealengine.com/Log_Ma…ode_and_Colour