Vector3Ext.IsInsideBox Method (Vector3, Vector3, Quaternion, Vector3, Vector3, Vector3, Vector3)

Checks if a point is inside of a box.

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

Syntax

C#

public static bool IsInsideBox(
	this Vector3 point,
	Vector3 boxPosition,
	Quaternion boxRotation,
	Vector3 boxScale,
	Vector3 boxCenter,
	Vector3 boxSize,
	Vector3 margin = default
)

Parameters

 

point
Type: Vector3
Point in world coordinates
boxPosition
Type: Vector3
The box position in world space
boxRotation
Type: Quaternion
The box rotation in world space
boxScale
Type: Vector3
The box scale
boxCenter
Type: Vector3
The box center in local box coordinates
boxSize
Type: Vector3
The box size in local box coordinates
margin (Optional)
Type: Vector3
Optional margin to be added to the each of the box sides

Return Value

Type: Boolean
True if it is inside, false if not

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector3. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

Vector3Ext Class
IsInsideBox Overload
UltimateXR.Extensions.Unity.Math Namespace