Class NetworkSandboxExts
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
sandboxNetworkSandboxhitShapeHitShapeinputSourceNetworkPlayerposVector3rotQuaternion
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
sandboxNetworkSandboxcenterVector2Center of the sphere.
radiusfloatRadius of the sphere.
hitsList<LagCompHit2D>inputSourceNetworkPlayerThe input source to compensate for.
layerMaskintA defines which layers of colliders to include in the query.
includeUnityCollidersboolChoose whether you want to include normal unity colliders, or only Netick HitShapes.
includeInputSourcebooloneHitPerHitShapeContainerboolChoose whether you want to include only one HitShape per HitShapeContainer
filterPredicate<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
sandboxNetworkSandboxcenterVector3Center of the sphere.
radiusfloatRadius of the sphere.
hitsList<LagCompHit>inputSourceNetworkPlayerThe input source to compensate for.
layerMaskintA defines which layers of colliders to include in the query.
queryTriggerInteractionQueryTriggerInteractionincludeUnityCollidersboolChoose whether you want to include normal unity colliders, or only Netick HitShapes.
includeInputSourcebooloneHitPerHitShapeContainerboolChoose whether you want to include only one HitShape per HitShapeContainer
filterPredicate<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
sandboxNetworkSandboxoriginVector3The starting point of the ray in world coordinates.
directionVector3The direction of the ray.
hitDataLagCompHitinputSourceNetworkPlayerThe input source to compensate for.
maxDistancefloatThe max distance the ray should check for collisions.
layerMaskintA that is used to selectively ignore Colliders when casting a ray.
queryTriggerInteractionQueryTriggerInteractionincludeUnityCollidersboolChoose whether you want to include normal unity colliders, or only Netick HitShapes.
includeInputSourceboolfilterPredicate<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
sandboxNetworkSandboxoriginVector2The starting point of the ray in world coordinates.
directionVector2The direction of the ray.
hitDataLagCompHit2DinputSourceNetworkPlayerThe input source to compensate for.
maxDistancefloatThe max distance the ray should check for collisions.
layerMaskintA that is used to selectively ignore Colliders when casting a ray.
includeUnityCollidersboolChoose whether you want to include normal unity colliders, or only Netick HitShapes.
includeInputSourceboolfilterPredicate<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
sandboxNetworkSandboxoriginVector3The starting point of the ray in world coordinates.
directionVector3The direction of the ray.
hitsList<LagCompHit>inputSourceNetworkPlayerThe input source to compensate for.
maxDistancefloatThe max distance the ray should check for collisions.
layerMaskintA that is used to selectively ignore Colliders when casting a ray.
queryTriggerInteractionQueryTriggerInteractionincludeUnityCollidersboolincludeInputSourcebooloneHitPerHitShapeContainerboolfilterPredicate<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
sandboxNetworkSandboxoriginVector2The starting point of the ray in world coordinates.
directionVector2The direction of the ray.
hitsList<LagCompHit2D>inputSourceNetworkPlayerThe input source to compensate for.
maxDistancefloatThe max distance the ray should check for collisions.
layerMaskintA that is used to selectively ignore Colliders when casting a ray.
includeUnityCollidersboolincludeInputSourcebooloneHitPerHitShapeContainerboolfilterPredicate<LagCompFilterData>