I have implemented a Light Intensity System based on the distance of my pawn to an specific object, that intensifies as the distance gets further. It works fine, the tutorial can be found here](- YouTube).
So now I wish to make the same logic in a Multiplayer Game, changing the Object to a Pawn, getting each one’s position replicated to all the clients and setting the light intensity based on the distance vector length. The distance must be calculated locally, from that avoiding the same resulted intensity replicated for all the pawns.
I’m confused about how to get the reference of each spawned Pawn and replicate their locations on the server and, then, run locally the intensity of other Pawns’ light. Could someone give me an idea of how to do this?
If someone has already made something similar, I’d be very thankful to know.
Another question: Is it better to create a BP_BaseLight and attach it in each pawn at the beginning of the match or directly add a PointLight component to each Pawn?