Table of Contents

Class NetworkSandboxExts

Namespace
Netick.Unity.Pro
Assembly
Netick.Unity.Pro.dll
public static class NetworkSandboxExts
Inheritance
NetworkSandboxExts
Inherited Members

Methods

FetchHitShapePosAndRot(NetworkSandbox, HitShape, NetworkPlayer, out Vector3, out Quaternion)

public static void FetchHitShapePosAndRot(this NetworkSandbox sandbox, HitShape hitShape, NetworkPlayer inputSource, out Vector3 pos, out Quaternion rot)

Parameters

sandbox NetworkSandbox
hitShape HitShape
inputSource NetworkPlayer
pos Vector3
rot Quaternion

OverlapCircle(NetworkSandbox, Vector2, float, List<LagCompHit2D>, NetworkPlayer, int, bool, bool, bool, Predicate<LagCompFilterData>)

Performs a lag compensated OverlapCircle which computes and stores HitShapes and Colliders (if includeUnityColliders is equal to true) touching or inside the circle.

public static void OverlapCircle(this NetworkSandbox sandbox, Vector2 center, float radius, List<LagCompHit2D> hits, NetworkPlayer inputSource, int layerMask = -5, bool includeUnityColliders = true, bool includeInputSource = false, bool oneHitPerHitShapeContainer = false, Predicate<LagCompFilterData> filter = null)

Parameters

sandbox NetworkSandbox
center Vector2

Center of the sphere.

radius float

Radius of the sphere.

hits List<LagCompHit2D>
inputSource NetworkPlayer

The input source to compensate for.

layerMask int

A defines which layers of colliders to include in the query.

includeUnityColliders bool

Choose whether you want to include normal unity colliders, or only Netick HitShapes.

includeInputSource bool
oneHitPerHitShapeContainer bool

Choose whether you want to include only one HitShape per HitShapeContainer

filter Predicate<LagCompFilterData>

OverlapSphere(NetworkSandbox, Vector3, float, List<LagCompHit>, NetworkPlayer, int, QueryTriggerInteraction, bool, bool, bool, Predicate<LagCompFilterData>)

Performs a lag compensated OverlapSphere which computes and stores HitShapes and Colliders (if includeUnityColliders is equal to true) touching or inside the sphere.

public static void OverlapSphere(this NetworkSandbox sandbox, Vector3 center, float radius, List<LagCompHit> hits, NetworkPlayer inputSource, int layerMask = -5, QueryTriggerInteraction queryTriggerInteraction = 0, bool includeUnityColliders = true, bool includeInputSource = false, bool oneHitPerHitShapeContainer = false, Predicate<LagCompFilterData> filter = null)

Parameters

sandbox NetworkSandbox
center Vector3

Center of the sphere.

radius float

Radius of the sphere.

hits List<LagCompHit>
inputSource NetworkPlayer

The input source to compensate for.

layerMask int

A defines which layers of colliders to include in the query.

queryTriggerInteraction QueryTriggerInteraction
includeUnityColliders bool

Choose whether you want to include normal unity colliders, or only Netick HitShapes.

includeInputSource bool
oneHitPerHitShapeContainer bool

Choose whether you want to include only one HitShape per HitShapeContainer

filter Predicate<LagCompFilterData>

Raycast(NetworkSandbox, Vector3, Vector3, out LagCompHit, NetworkPlayer, float, int, QueryTriggerInteraction, bool, bool, Predicate<LagCompFilterData>)

Casts a lag compensated ray, from point origin, in direction direction, of length maxDistance, against all HitShapes and Colliders (if includeUnityColliders is equal to true) in the Scene.

public static bool Raycast(this NetworkSandbox sandbox, Vector3 origin, Vector3 direction, out LagCompHit hitData, NetworkPlayer inputSource, float maxDistance = Infinity, int layerMask = -5, QueryTriggerInteraction queryTriggerInteraction = 0, bool includeUnityColliders = true, bool includeInputSource = false, Predicate<LagCompFilterData> filter = null)

Parameters

sandbox NetworkSandbox
origin Vector3

The starting point of the ray in world coordinates.

direction Vector3

The direction of the ray.

hitData LagCompHit
inputSource NetworkPlayer

The input source to compensate for.

maxDistance float

The max distance the ray should check for collisions.

layerMask int

A that is used to selectively ignore Colliders when casting a ray.

queryTriggerInteraction QueryTriggerInteraction
includeUnityColliders bool

Choose whether you want to include normal unity colliders, or only Netick HitShapes.

includeInputSource bool
filter Predicate<LagCompFilterData>

Returns

bool

Returns true if the ray intersects with a Collider/HitShape, otherwise false.

Raycast2D(NetworkSandbox, Vector2, Vector2, out LagCompHit2D, NetworkPlayer, float, int, bool, bool, Predicate<LagCompFilterData>)

Casts a lag compensated ray, from point origin, in direction direction, of length maxDistance, against all HitShapes and Colliders (if includeUnityColliders is equal to true) in the Scene.

public static bool Raycast2D(this NetworkSandbox sandbox, Vector2 origin, Vector2 direction, out LagCompHit2D hitData, NetworkPlayer inputSource, float maxDistance = Infinity, int layerMask = -5, bool includeUnityColliders = true, bool includeInputSource = false, Predicate<LagCompFilterData> filter = null)

Parameters

sandbox NetworkSandbox
origin Vector2

The starting point of the ray in world coordinates.

direction Vector2

The direction of the ray.

hitData LagCompHit2D
inputSource NetworkPlayer

The input source to compensate for.

maxDistance float

The max distance the ray should check for collisions.

layerMask int

A that is used to selectively ignore Colliders when casting a ray.

includeUnityColliders bool

Choose whether you want to include normal unity colliders, or only Netick HitShapes.

includeInputSource bool
filter Predicate<LagCompFilterData>

Returns

bool

Returns true if the ray intersects with a Collider/HitShape, otherwise false.

RaycastAll(NetworkSandbox, Vector3, Vector3, List<LagCompHit>, NetworkPlayer, float, int, QueryTriggerInteraction, bool, bool, bool, Predicate<LagCompFilterData>)

Casts a lag compensated ray, from point origin, in direction direction, of length maxDistance, against all HitShapes and Colliders (if includeUnityColliders is equal to true) in the Scene, and returns all the hits.

public static void RaycastAll(this NetworkSandbox sandbox, Vector3 origin, Vector3 direction, List<LagCompHit> hits, NetworkPlayer inputSource, float maxDistance = Infinity, int layerMask = -5, QueryTriggerInteraction queryTriggerInteraction = 0, bool includeUnityColliders = true, bool includeInputSource = false, bool oneHitPerHitShapeContainer = false, Predicate<LagCompFilterData> filter = null)

Parameters

sandbox NetworkSandbox
origin Vector3

The starting point of the ray in world coordinates.

direction Vector3

The direction of the ray.

hits List<LagCompHit>
inputSource NetworkPlayer

The input source to compensate for.

maxDistance float

The max distance the ray should check for collisions.

layerMask int

A that is used to selectively ignore Colliders when casting a ray.

queryTriggerInteraction QueryTriggerInteraction
includeUnityColliders bool
includeInputSource bool
oneHitPerHitShapeContainer bool
filter Predicate<LagCompFilterData>

RaycastAll2D(NetworkSandbox, Vector2, Vector2, List<LagCompHit2D>, NetworkPlayer, float, int, bool, bool, bool, Predicate<LagCompFilterData>)

Casts a lag compensated ray, from point origin, in direction direction, of length maxDistance, against all HitShapes and Colliders (if includeUnityColliders is equal to true) in the Scene, and returns all the hits.

public static void RaycastAll2D(this NetworkSandbox sandbox, Vector2 origin, Vector2 direction, List<LagCompHit2D> hits, NetworkPlayer inputSource, float maxDistance = Infinity, int layerMask = -5, bool includeUnityColliders = true, bool includeInputSource = false, bool oneHitPerHitShapeContainer = false, Predicate<LagCompFilterData> filter = null)

Parameters

sandbox NetworkSandbox
origin Vector2

The starting point of the ray in world coordinates.

direction Vector2

The direction of the ray.

hits List<LagCompHit2D>
inputSource NetworkPlayer

The input source to compensate for.

maxDistance float

The max distance the ray should check for collisions.

layerMask int

A that is used to selectively ignore Colliders when casting a ray.

includeUnityColliders bool
includeInputSource bool
oneHitPerHitShapeContainer bool
filter Predicate<LagCompFilterData>