TheAutopilot (talk | contribs) fixed incorrect spelling of Location.Indoors |
TheAutopilot (talk | contribs) No edit summary |
||
Line 42: | Line 42: | ||
|Default: 288.15 K (= 15°C) | |Default: 288.15 K (= 15°C) | ||
|temperature (0K = -273.15°C, 273.15K = 0°C) | |temperature (0K = -273.15°C, 273.15K = 0°C) | ||
* makes things freeze, boil or ignite | |||
Typical temperatures for reference: | Typical temperatures for reference: | ||
Line 59: | Line 62: | ||
|Default: 101325 Pa | |Default: 101325 Pa | ||
|pressure | |pressure | ||
* expand or compress hollow objects | |||
Typical pressures for reference: | Typical pressures for reference: | ||
Line 71: | Line 77: | ||
|Default: [0;-9.81;0] m/s² | |Default: [0;-9.81;0] m/s² | ||
|global acceleration due to gravity | |global acceleration due to gravity | ||
* accelerate users or items | |||
|TheAutopilot, 2025 | |TheAutopilot, 2025 | ||
|- | |- | ||
Line 85: | Line 93: | ||
|Default: 1.225 kg/m³ (air) | |Default: 1.225 kg/m³ (air) | ||
|density of the gas/liquid/solid at the sampled position | |density of the gas/liquid/solid at the sampled position | ||
* detect if within vacuum (breathing) | |||
* compute wind force together with velocity | |||
|TheAutopilot, 2025 | |TheAutopilot, 2025 | ||
|- | |- | ||
Line 92: | Line 103: | ||
|Default: [0;0;0] m/s | |Default: [0;0;0] m/s | ||
|global velocity of the gas or liquid at the sampled position | |global velocity of the gas or liquid at the sampled position | ||
* compute wind force together with density | |||
|TheAutopilot, 2025 | |TheAutopilot, 2025 | ||
|- | |- | ||
Line 106: | Line 119: | ||
|Default: [0;0;0] T | |Default: [0;0;0] T | ||
|vector of the global [[wikipedia:Magnetic_field|magnetic field]] at the sampled position | |vector of the global [[wikipedia:Magnetic_field|magnetic field]] at the sampled position | ||
* makes a compass point to another direction | |||
|Papaltine, 2025 | |Papaltine, 2025 | ||
|- | |- | ||
Line 112: | Line 127: | ||
|V | |V | ||
|Default: 0 V | |Default: 0 V | ||
|electric potential | |electric potential | ||
* allows measuring voltage between two points | |||
* can be used to check if | |||
|TheAutopilot, 2025 | |TheAutopilot, 2025 | ||
|} | |} | ||
Line 144: | Line 162: | ||
|describes whether a location is indoors | |describes whether a location is indoors | ||
|TheAutopilot, 2025 | |TheAutopilot, 2025 | ||
|- | |||
|Location.Underwater | |||
|bool | |||
|Default: false | |||
|describes whether a location is underwater | |||
|TheAutopilot, | |||
2025 | |||
|} | |} |
Revision as of 01:05, 11 May 2025
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 |
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) | 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 | vector of the global electric field at the sampled position | Papaltine, 2025 |
Physics.MagneticField | float3 | T (Tesla) | Default: [0;0;0] T | 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 | describes whether a location is indoors | TheAutopilot, 2025 |
Location.Underwater | bool | Default: false | describes whether a location is underwater | TheAutopilot,
2025 |