Type:RootSpace: Difference between revisions

From Resonite Wiki
No edit summary
add and generalize the info on this type because it's used in a lot of places.
 
Line 1: Line 1:
{{stub}}
{{stub}}
Root Space is a type that specifies the coordinate space of transform data (position, rotation, scale, delta, offset) provided to a component.
[[Coordinate spaces]] is a page that explains the general idea of coordinate spaces in more depth. Please look at that page if you don't understand coordinate spaces at a basic level or you may become lost here.


== Fields ==
== Fields ==


{{Table TypeFields
{{Table TypeFields
|LocalSpace|Slot|This determines if gravity is a local or global direction. Turning this off makes you fall down relative to the [[Root]] rather than what you're parented under.
|LocalSpace|Slot|This is the slot that the transform data is a coordinate space of (Local Space). If it isn't specified, then the transform data is the space specified by <code>Default</code> instead.
|UseParentSpace|Bool|This determines if gravity is a local or the slot above what you're parented under.  
|UseParentSpace|Bool|If this is turned on, then the transform data will be part of the coordinate space of the slot above <code>LocalSpace</code>. if the slot above is Root, then the space is automatically Global Space.  
|Default|'''[[#DefaultSpace|DefaultSpace]]'''|TypeAdv2=true|
|Default|'''[[#DefaultSpace|DefaultSpace]]'''|TypeAdv2=true| The space to use if there is no specified <code>LocalSpace</code> slot.
|OverrideRootSpace|{{RootFieldType|RelayRef`1|[[Type:RootSpace|RootSpace]]}}|TypeAdv3=true|
|OverrideRootSpace|{{RootFieldType|RelayRef`1|[[Type:RootSpace|RootSpace]]}}|TypeAdv3=true| Override all the settings of this RootSpace to match the target <code>OverrideRootSpace</code> instead.
}}
}}


Line 17: Line 20:
}}
}}


{{stub}}
Default space controls the behavior of [[Type:RootSpace|RootSpace]] when <code>LocalSpace</code> is null, acting as a virtual autofiller of <code>LocalSpace</code>.


{{Table EnumValues
{{Table EnumValues
|WorldRoot|0|
|WorldRoot|0| The transform data is Global Spaced. (When <code>LocalSpace</code> is null)
|LocalUserSpace|1|
|LocalUserSpace|1| Use the Local User's parent slot as the <code>LocalSpace</code> instead. (no this doesn't autofill <code>LocalSpace</code> with the user's parent slot, but makes the type act like it is) (When <code>LocalSpace</code> is null)
|LocalUserRoot|2|
|LocalUserRoot|2| Use the Local User's UserSlot as the <code>LocalSpace</code> instead. (no this doesn't autofill <code>LocalSpace</code> with the user's UserSlot, but makes the type act like it is) (When <code>LocalSpace</code> is null)
}}
}}


[[Category:Type]]
[[Category:Type]]

Latest revision as of 17:14, 23 October 2024

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Root Space is a type that specifies the coordinate space of transform data (position, rotation, scale, delta, offset) provided to a component.

Coordinate spaces is a page that explains the general idea of coordinate spaces in more depth. Please look at that page if you don't understand coordinate spaces at a basic level or you may become lost here.

Fields

Fields
Name Type Description
LocalSpace Slot This is the slot that the transform data is a coordinate space of (Local Space). If it isn't specified, then the transform data is the space specified by Default instead.
UseParentSpace Bool If this is turned on, then the transform data will be part of the coordinate space of the slot above LocalSpace. if the slot above is Root, then the space is automatically Global Space.
Default DefaultSpace The space to use if there is no specified LocalSpace slot.
OverrideRootSpace direct RelayRef`1<RootSpace> Override all the settings of this RootSpace to match the target OverrideRootSpace instead.


DefaultSpace

Enum
Name: DefaultSpace
Type: FrooxEngine.RootSpace+DefaultSpace

Default space controls the behavior of RootSpace when LocalSpace is null, acting as a virtual autofiller of LocalSpace.

Values
Name Value Description
WorldRoot 0 The transform data is Global Spaced. (When LocalSpace is null)
LocalUserSpace 1 Use the Local User's parent slot as the LocalSpace instead. (no this doesn't autofill LocalSpace with the user's parent slot, but makes the type act like it is) (When LocalSpace is null)
LocalUserRoot 2 Use the Local User's UserSlot as the LocalSpace instead. (no this doesn't autofill LocalSpace with the user's UserSlot, but makes the type act like it is) (When LocalSpace is null)