scalinginteractionattachcontroller - eisclimber/ExPresS-XR GitHub Wiki
Class in UnityEngine.XR.Interaction.Toolkit.Attachment
Inherits from UnityEngine.MonoBehaviour
This is a copy-pasta from the InteractionAttachController since it it can not properly modified.
Rather having to overwrite 4 different functions to be able to adjust the logic of manipulating the y-axis, we chose to copy the whole class...
This is a dirty hack but we're hoping the feature can be deprecated with rework of the XRITK Affordance System, some time soon.
public class ScalingInteractionAttachController : MonoBehaviour, IInteractionAttachController| Name | Description |
|---|---|
| ManipulationXAxisMode | Mode for what the x-axis (left/right) of the manipulation input does when controlling the anchor. |
| ManipulationYAxisMode | Mode for what the y-axis (up/down) of the manipulation input does when controlling the anchor. |
| Name | Description |
|---|---|
| ResetOffset() | Resets the offset of an attached interactable. |
| Name | Description |
|---|---|
| angleStabilization | Factor for stabilizing angle. This value represents the maximum angle (in degrees) over which angle stabilization will be applied. Larger values increase the range of stabilization, making the effect more pronounced over a greater angle. |
| combineManipulationAxes | Whether to allow simultaneous vertical and horizontal rotation or simultaneous translation and horizontal rotation. |
| Disable to allow only one axis of manipulation input at a time based on which axis is most actuated. | |
| enableDebugLines | Enable debug lines for the attach transform offset and velocity vector. |
| hasOffset | Indicates whether the anchor currently has an offset applied. |
| manipulationInput | Input to use for rotating or translating the attach point closer or further away. |
| This effectively rotates or moves the selected grab interactable along the ray. | |
| manipulationRotateReferenceFrame | The optional reference frame to define the rotation axes when the anchor is rotated when using manipulation input. |
| When not set, vertical rotation (pitch) is around the local x-axis and horizontal rotation (yaw) is around the local y-axis | |
| of the anchor. | |
| manipulationRotateSpeed | Speed at which the anchor is rotated when using manipulation input. |
| manipulationScaleSpeed | Speed at which the anchor is translated when using manipulation input. |
| manipulationTranslateSpeed | Speed at which the anchor is translated when using manipulation input. |
| manipulationXAxisMode | Mode for what the x-axis (left/right) of the manipulation input does when controlling the anchor. |
| manipulationYAxisMode | Mode for what the y-axis (up/down) of the manipulation input does when controlling the anchor. |
| maxAdditionalVelocityScalar | Maximum additional velocity scaling factor for movement, interpolated by a quad bezier curve. |
| minAdditionalVelocityScalar | Minimum additional velocity scaling factor for movement, interpolated by a quad bezier curve. |
| momentumDecayScale | Decay scalar for momentum when triggered with push/pull gesture. Higher values will cause momentum to decay faster. |
| momentumDecayScaleFromInput | Decay scalar for momentum when triggered with manipulation input. Higher values will cause momentum to decay faster. |
| motionStabilizationMode | Gets or sets the stabilization mode for the motion of the anchor. Determines how the anchor's position and rotation are stabilized relative to the followed transform. |
| positionStabilization | Factor for stabilizing position. This value represents the maximum distance (in meters) over which position stabilization will be applied. Larger values increase the range of stabilization, making the effect more pronounced over a greater distance. |
| pullVelocityBias | Adjusts the object's velocity calculation when moving towards the user. |
| It modifies the distance-based calculation that determines the velocity scalar. | |
| minAdditionalVelocityScalar maxAdditionalVelocityScalar | |
| pushVelocityBias | Adjusts the object's velocity calculation when moving away from the user. |
| It modifies the distance-based calculation that determines the velocity scalar. | |
| minAdditionalVelocityScalar maxAdditionalVelocityScalar | |
| smoothingSpeed | Smoothing amount for the anchor's position and rotation. Higher values mean more smoothing occurs faster. |
| smoothOffset | If true offset will be smoothed over time in XR Origin space. |
| May present some instability if smoothing is toggled during an interaction. | |
| transformToFollow | Gets or sets the transform that the anchor should follow. |
| useDistanceBasedVelocityScaling | Whether to use distance-based velocity scaling for anchor movement. |
| useManipulationInput | Whether to use input-based manipulation for anchor movement. |
| useMomentum | Whether momentum is used when useDistanceBasedVelocityScaling is active. |
| zVelocityRampThreshold | Scales anchor velocity from 0 to 1 based on z-velocity's deviation below a threshold. 0 means no scaling. |