RaptorMovingParts
The bake's rules for moving parts.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
public static class RaptorMovingPartsMethods
ApplyElementStatics
public static void ApplyElementStatics(Transform elementRoot)Reapplies the static flags of every moving part inside an element. The room bake calls this once per element.
| Parameter | Type | Description |
|---|---|---|
elementRoot | Transform | The element's root. |
ApplyPartStatics
public static void ApplyPartStatics(Transform partRoot)Sets a moving part's static flags. A probe-lit part is made fully non-static. A part baked at rest is also made non-static, and then the renderers in its baked Object container are set to ContributeGI only. The root's live preview is left non-static because it has no lightmap UVs.
| Parameter | Type | Description |
|---|---|---|
partRoot | Transform | The part's root. |
ContributesGIAtRest
public static bool ContributesGIAtRest(Transform part)Whether part is a moving part lit "Baked at rest", meaning it has an IRaptorMovingPart that contributes GI at its rest pose.
| Parameter | Type | Description |
|---|---|---|
part | Transform | The part's root. |
Returns: True for a moving part baked at rest.
IsPart
public static bool IsPart(RaptorModel model)Whether model is the model of a moving part, meaning its root has an IRaptorMovingPart.
| Parameter | Type | Description |
|---|---|---|
model | RaptorModel | The model. |
Returns: True when it is.
LocalPoseIn
public static Matrix4x4 LocalPoseIn(Transform part, Transform roomRoot)Gets the part's pose in its room root's space, composed from local transforms only. The result is bit-identical wherever the room root is, matching how ComputeGeometryHash excludes the root.
| Parameter | Type | Description |
|---|---|---|
part | Transform | The part's root. |
roomRoot | Transform | The room's root. |
Returns: The matrix.
Related types
- IRaptorMovingPart: A nested model that moves.
- RaptorModel: The root of a RAPTOR model and its output container.