Snapping Class |
Namespace: ImmerseSDK.Interaction
[SerializableAttribute] public class Snapping
The Snapping type exposes the following members.
Name | Description | |
---|---|---|
AllowPhysicsWhenSnappedToOrigin |
Returns true if this object will not be kinematic when snapped to origin, otherwise false
| |
AlwaysSnap |
True if this object always snaps to the nearest target
| |
DefaultSnapTarget |
Returns the default snap target
| |
Enabled |
True if snapping is supported (targets were specified or we snap to origin)
| |
MaxDistanceTolerance |
Maximum Distance tolerance for snapping
Note: This only applies if AlwaysSnap is false
| |
OriginSnapTargetIndex |
The original snap target index, or UnassignedSnapTarget (255) if not assigned
| |
PreviewSnap |
True if preview snap is enabled
| |
RotationAxisFilter |
Filter for all snapping targets
Note: This only applies if AlwaysSnap is false
| |
SnapToOrigin |
Returns true if this object will snap to its original position
| |
TargetCount |
Returns the number of snap targets available
|
Name | Description | |
---|---|---|
CenterSnapTargetOffsetToBounds | ||
DoesTargetsContain | ||
GetClosest |
Gets the closest snap target index to the Transform Sync
| |
GetIndex |
Gets the index of the specified SnapTarget. Returns 255 (TransformSync.NotSnappedState) if it is not found
| |
GetTarget |
Get target at specified index
|
Name | Description | |
---|---|---|
_allowPhysicsWhenSnappedToOrigin |
Set this to true to allow physics after snapping to origin
| |
_alwaysSnap |
Ignore tolerance and always snap to the closest SnapTarget?
| |
_defaultSnapTarget |
If no SnapTarget is found, this value will be used (255 = no default snap target)
| |
_previewSnap |
Toggle snapping preview
| |
_snapToOrigin |
Set this to true if you want an object to start in a snapped state. This will create a SnapTarget at it's location
| |
_targets |
List of SnapTargets available. If you allow SnapToOrigin, then the origin will be automatically added at runtime to this list (at the end)
| |
_unsnapRequirements |
A set of requirements to check before unsnap is allowed
| |
RotationAxisAll |
Cached object to not mask anything
| |
RotationAxisX |
Cached object to mask for a X axis rotation only (thus including only X rotation)
| |
RotationAxisY |
Cached object to mask for a y axis rotation only (thus including only Y rotation)
| |
RotationAxisZ |
Cached object to mask for a Z axis rotation only (thus including only Z rotation)
| |
UnassignedSnapTarget |
Constant value to indicate Unassigned state
|