The Virtual Parent Component is used to make a [[Slot]] act as the child of another Slot without needing to be in the normal hierarchy order. This can be useful when you need it to respond in a certain way using transforms of the overriding parent.
{{Note|The Virtual Parent Component will not automatically update the slot unless the overriding parent slot has moved, rotated, or scaled (or in some way updated its current transform)|warning}}
The different ways to force this Slot (that has the Virtual Parent Component on it) to update its own transform, is to move it by grabbing it, using other components to move it, or using Flux.
You can use the provided local offset fields to then further position this slot from its virtual parent.
<!--T:2-->
<!--T:2-->
Line 12:
Line 21:
{{Table ComponentFields
{{Table ComponentFields
|OverrideParent|Slot|If not null, the slot that the object gets reparented to
|OverrideParent|Slot|If not null, the slot that the object gets reparented to
|_targetPos|IField`1|TypeString1=IField<floatQ>|Position to be driven by parent's position.
|_targetPos|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv1=true|Position to be driven by parent's position.
|_targetRot|IField`1|TypeString2=IField<floatQ>|Rotation to be driven by parent's rotation.
|_targetRot|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv2=true|Rotation to be driven by parent's rotation.
|_targetScl|IField`1|TypeString3=IField<floatQ>|Scale to be driven by parent's scale.
|_targetScl|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv3=true|Scale to be driven by parent's scale.
|LocalPosition|Float3|Object's position relative to parent.
|LocalPosition|Float3|Object's position relative to parent.
|LocalRotation|Float3|Object's rotation relative to parent.
|LocalRotation|FloatQ|Object's rotation relative to parent.
|LocalScale|Float3|Object's scale relative to parent.
|LocalScale|Float3|Object's scale relative to parent.
The Virtual Parent Component is used to make a Slot act as the child of another Slot without needing to be in the normal hierarchy order. This can be useful when you need it to respond in a certain way using transforms of the overriding parent.
The Virtual Parent Component will not automatically update the slot unless the overriding parent slot has moved, rotated, or scaled (or in some way updated its current transform)
The different ways to force this Slot (that has the Virtual Parent Component on it) to update its own transform, is to move it by grabbing it, using other components to move it, or using Flux.
You can use the provided local offset fields to then further position this slot from its virtual parent.