UxrMathUtils.IsBoxInsideBox Method (Vector3, Quaternion, Vector3, Vector3, Vector3, BoxCollider, Vector3)

Checks if a box is completely (all corners) inside a BoxCollider

Namespace: UltimateXR.Core.Math
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static bool IsBoxInsideBox(
	Vector3 boxPosition,
	Quaternion boxRotation,
	Vector3 boxScale,
	Vector3 boxCenter,
	Vector3 boxSize,
	BoxCollider boxVolume,
	Vector3 margin = default
)

Parameters

 

boxPosition
Type: Vector3
Position of the box to test if it is inside the BoxCollider
boxRotation
Type: Quaternion
Rotation of the box to test if it is inside the BoxCollider
boxScale
Type: Vector3
Scale of the box to test if it is inside the BoxCollider
boxCenter
Type: Vector3
Center of the box (in local coordinates) to test if it is inside the BoxCollider
boxSize
Type: Vector3
Size of the box (in local coordinates) to test if it is inside the BoxCollider
boxVolume
Type: BoxCollider
BoxCollider to test against
margin (Optional)
Type: Vector3
Allowed margin for each x, y, z component

Return Value

Type: Boolean
True if all corners are inside the BoxCollider plus margin

See Also

Reference

UxrMathUtils Class
IsBoxInsideBox Overload
UltimateXR.Core.Math Namespace