Spatial Variables are a powerful feature allowing you to define location-dependent values. To support seamless interaction between independently developed objects it is necessary to follow standards for naming, types, content and sampling of spatial variables.
This article collects several community-proposed standards made with the goal that other users - instead of creating their own - reuse them for compatibility with other creations.
Recommendations
To avoid the risk of naming conflicts it is recommended to follow the naming standard "Prefix.Variable" where a shared prefix groups related variables together.
Using PascalCase would make all future proposals consistent to the existing ones.
Official Variables
The following variables are defaults used by FrooxEngine:
Variable | Type | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|
Resonite.Audio.Filters | AudioDSP_Effect | Sample via the ReferenceSpatialVariableCollector | audio effects like reverb that are in effect in an area | Frooxius, 2025 |
Simple Interactions
The following variables are made to be easily integrated into an object:
Variable | Type | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|
Heat | float | Additive
Default: 0 |
Positive: heat source
Negative: heat sink suggested values: A few meters from a fire: 1 Cooking: 10 Slightly cold: -1 Freezing: -10 |
LucasRo7, 2025 |
Fire | bool | MaxPriority
Default: false |
sets things on fire | LucasRo7, alizard, Panda, 2025 |
Water | bool | MaxPriority
Default: false |
puts out fire and makes things wet | LucasRo7, Panda, 2025 |
Electric | bool | MaxPriority
Default: false |
shocks things or people, may turn devices on | LucasRo7, 2025 |
Wind | float3 | Default: [0;0;0] | wind speed in m/s | LucasRo7, 2025 |
Physical Quantities
Temperature, pressure and other values can vary greatly between different locations. (i.e. temperature within fire vs. temperature of an ice cube)
Variable | Type | Unit | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|---|
Physics.Temperature | float | K | Default: 288.15 K (= 15°C)
Mode: Weighted Average |
temperature (0K = -273.15°C, 273.15K = 0°C)
Typical temperatures for reference:
|
TheAutopilot, 2025 |
Physics.Pressure | float | Pa | Default: 101325 Pa | pressure
Typical pressures for reference:
|
TheAutopilot, 2025 |
Physics.Gravity | float3 | m/s² | Default: [0;-9.81;0] m/s² | global acceleration due to gravity
|
TheAutopilot, 2025 |
Physics.Force | float3 | N | Default: [0;0;0] N | global force applied to all objects within the field | TheAutopilot, 2025 |
Physics.Density | float | kg/m³ | Default: 1.225 kg/m³ (air) | density of the gas/liquid/solid at the sampled position
|
TheAutopilot, 2025 |
Physics.Velocity | float3 | m/s | Default: [0;0;0] m/s | global velocity of the gas or liquid at the sampled position
|
TheAutopilot, 2025 |
Physics.ElectricField | float3 | V/m | Default: [0;0;0] V/m
Mode: Additive |
vector of the global electric field at the sampled position | Papaltine, 2025 |
Physics.MagneticField | float3 | T (Tesla) | Default: [0;0;0] T
Mode: Additive |
vector of the global magnetic field at the sampled position
|
Papaltine, 2025 |
Physics.ElectricPotential | float | V | Default: 0 V | electric potential
|
TheAutopilot, 2025 |
Location Descriptions
Variable | Type | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|
Location.Tags | string | Default: null | space-separated list of tags describing location
(recommended order: most general to most specific) Note: Simply checking Contains may lead to errors with partial matches! |
Redd, 2025 |
Location.Slot | Slot | Default: null/Root (depends on use-case) | Slot representing the location a position is in
This can be used to interact with dynamic impulses and dynamic variables. |
TheAutopilot, 2025 |
Location.Indoors | bool | Default: false
Blending: MaxPriority |
describes whether a location is indoors | TheAutopilot, 2025 |
Location.Underwater | bool | Default: false
Blending: MaxPriority |
describes whether a location is underwater | TheAutopilot,
2025 |