Download

Radial force -> fire impulse = different results on client/server

Hi,
Im breaking destructible mesh to pieces with radial force → fire impulse in multicast event… Im getting different results on server and client as you can see… How to fix this? I can’t get impulse if its not in multicast node… i dont know why even server cant see impulse…

So the inpulse doesn’t fire on the server?

I really dont know… it looks like on clients is impulse fired 2x (server + multicast)… but if i dont use multicast, then destructible mesh is never broken

make sure the destructible mesh is set to replicate, then fire the event on the server only if you want consistent results from all clients. I would still use a multicast for any cosmetic effects (audio, particles etc). the question would be tho, is do you NEED the same result on all clients? you can always multicast the impulse, but set your physics objects to not interact with destructible components and therefore not effect game play.

That destructible mesh is in replicated actor. I dont need same results on every client :slight_smile: i only want same “impulse” value, as you can see, server impulse looks like “1000” and client’s like “5000”… That force is significantly stronger on clients as on server…

it might be in a replicated actor, but make sure that component is set to replicate as well if you want that same result. if not, call the multicast from the server and blow it up :slight_smile: remember multicast also calls on the server, so make sure you’re not calling it twice there

Shouldn’t the orojectile belong to the server.

Ie: client fires- tells server hey I want to spawn a projectile. The server says ok let me spawn that for you using a multicast so everyone sees it. Using the information you provided me.

Don’t have the client multicast the event.

Client - run on server - server runs multicast event.

this is mine setup:

In multicast event im setting collision object type to “destructible” and then firing impulse…

Now i tested it out of multicast (before i not noticed that im setting in multicast collision so it not worked) - only in “run on server” event - same results… (different impulses)

I’d verify if the impulse is the problem, remember you can set inside the destructible component to push away I forget the term I’m mobile atm.

I’d remove the impulse and see if it looks the same without it.

Also careful with collision for the Gibs of the mesh. I use destructible pieces in my game and because client and server won’t match it caused problems with players walking on the debris

Also in thinking the client is adding impulse and server isn’t running the same command. Which is why often such effects are run by server to multicast to clients.

I have exploding body’s in my game and what I do when I explode them is destroy the actor and use the server to spawn an exploding effect using multicast of that effect.

Bump… Im using this function (its called by server on ApplyDamage event) but i still have different results as described in first post…

up…
→ different results i mean impulse on server looks like 1000 strenght but on client like 3000 strenght