cBournhonesque / lightyear

A networking library to make multiplayer games for the Bevy game engine
https://cbournhonesque.github.io/lightyear/book
Apache License 2.0
459 stars 47 forks source link

Support per component visibility/relevance #540

Open notmd opened 3 months ago

notmd commented 3 months ago

bevy_replicon has a disscution including a summary of planned implementation details here https://github.com/projectharmonia/bevy_replicon/issues/304

cBournhonesque commented 3 months ago

Note that you can override the NetworkTarget for a specific component like this: https://docs.rs/lightyear/latest/lightyear/shared/replication/components/struct.OverrideTargetComponent.html

it might be less elegant than the mask idea proposed in replicon, but it should be enough for most cases currently.

You can find an example here: https://github.com/cBournhonesque/lightyear/blob/main/examples/avian_physics/src/server.rs#L160

Would that work for you?

notmd commented 3 months ago

Oh didn't know the OverrideTargeteComponent. It is fine for my use case, but supporting the mask solution would be great.