Spatial variable standards

From Resonite Wiki
(Redirected from Spatial Variable Standards)

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
As of 2025 spatial variables are a relatively recent feature which means that many of the community-made proposals are still young and may still be under construction. If you see a need for a new standard, feel free to add it to this page! You can discuss your ideas in detail on Discord or the Talk Page.

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)
  • makes things freeze, boil or ignite

Typical temperatures for reference:

  • Freezing water: 273.15K (=0°C)
  • Boiling water (sea level): 373.15K (=100°C)
  • Igniting wood: 553-613K (=280-340°C)
  • Igniting gasoline: 493-733K (=220-460°C)
  • Igniting propane: 743K (=470°C)
  • Wood flame (air): 1300K (=1027°C)
  • Gasoline flame: 1299K (=1026°C)
  • Propane flame (air): 1473-1973K (=1200-1700°C)
TheAutopilot, 2025
Physics.Pressure float Pa Default: 101325 Pa pressure
  • expand or compress hollow objects

Typical pressures for reference:

  • sea level: 101325 Pa
  • exponential decrease by 50% per 5400m altitude
  • every 1m under water: add 9810 Pa
TheAutopilot, 2025
Physics.Gravity float3 m/s² Default: [0;-9.81;0] m/s² global acceleration due to gravity
  • accelerate users or items
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
  • detect if within vacuum (breathing)
  • compute wind force together with velocity
TheAutopilot, 2025
Physics.Velocity float3 m/s Default: [0;0;0] m/s global velocity of the gas or liquid at the sampled position
  • compute wind force together with density
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
  • makes a compass point to another direction
Papaltine, 2025
Physics.ElectricPotential float V Default: 0 V electric potential
  • allows measuring voltage between two points
  • can be used to check if
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