Improbable Icon

SpatialOS load balancer units of measure



I’m only just scratching the surface of Spatial OS, so please forgive my question if it is silly. In reading the SDK documentation for the load balancer config, it describes settings in terms of meters (min_range_meters, max_range_meters), yet other parts of the SDK such as the section describing entity interest use a unitless value for describing distance. I’ve also read that Unity uses the meter as its standard unit.

If I had to guess, I’d assume that the load balancer configuration properties just had misleading names, but I wanted to make sure that there is not some hidden caveat. I can’t imagine the load balancer logic would insist on meters as the unit of measure.


Hey @nikdunn1979, welcome to the forums :slight_smile:

You’re totally correct that there is some mixing of terms in the docs… We’re working on fixing that.
Suffice to say that SpatialOS has no opinion of what the units of your world are - so world_units is the correct way to think of it.
This applies to worker interest radius, load balancing range, all that kind of platform config.

It’s up to workers to make sense of what a ‘world unit’ is really.
For example, in Unity the assumption is that 1 world unit == 1 meter, but ultimately the mapping from SpatialOS coordinates to Unity coordinates is under your control.
Hope that makes sense!


That does, thanks for clarifying my assumption.