Represents a single lag-compensated collider. Multiple component instances can be added anywhere in the hierarchy of a NetworkObject which includes a HitboxRoot. More...
Inherits Behaviour.
Public Member Functions | |
void | OnDrawGizmos () |
Draws this hitbox gizmo on Unity editor. More... | |
Public Member Functions inherited from Behaviour | |
T | AddBehaviour< T > () |
Wrapper for Unity's GameObject.AddComponent() More... | |
T | GetBehaviour< T > () |
Wrapper for Unity's GameObject.GetComponentInChildren() More... | |
bool | TryGetBehaviour< T > (out T behaviour) |
Wrapper for Unity's GameObject.TryGetComponent() More... | |
Public Attributes | |
Vector3 | BoxExtents |
When Type is set to HitboxTypes.Box, this defines the local-space geometry for narrow-phase checks. More... | |
Color | GizmosColor = Color.yellow |
Color used when drawing gizmos for this hitbox. More... | |
Vector3 | Offset |
This Hitbox's local-space offset from its GameObject position. More... | |
HitboxRoot | Root |
Reference to the top-level HitboxRoot component for this NetworkObject. More... | |
float | SphereRadius |
When Type is set to HitboxTypes.Sphere, this defines the local-space geometry for narrow-phase checks. More... | |
HitboxTypes | Type |
The collision geometry type for this Hitbox. More... | |
Protected Member Functions | |
virtual void | DrawGizmos (Color color, ref Matrix4x4 localToWorldMatrix) |
Properties | |
int | ColliderIndex [get] |
Index assigned to the collider of this hitbox on the lag-compensated snapshots. More... | |
bool | HitboxActive [get, set] |
Get or set the state of this Hitbox. If a hitbox or its HitboxRoot are not active, it will not be hit by lag-compensated queries. More... | |
Int32 | HitboxIndex [get] |
The index of this hitbox in the HitboxRoot.Hitboxes array on Root. The value is set by the root when initializing the nested hitboxes with HitboxRoot.InitHitboxes. More... | |
Vector3 | Position [get] |
World-space position (includes Offset) of this Hitbox. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Behaviour | |
static void | DestroyBehaviour (Behaviour behaviour) |
Wrapper for Unity's GameObject.Destroy() More... | |
Represents a single lag-compensated collider. Multiple component instances can be added anywhere in the hierarchy of a NetworkObject which includes a HitboxRoot.
void OnDrawGizmos | ( | ) |
Draws this hitbox gizmo on Unity editor.
Vector3 BoxExtents |
When Type is set to HitboxTypes.Box, this defines the local-space geometry for narrow-phase checks.
Color GizmosColor = Color.yellow |
Color used when drawing gizmos for this hitbox.
Vector3 Offset |
This Hitbox's local-space offset from its GameObject position.
HitboxRoot Root |
Reference to the top-level HitboxRoot component for this NetworkObject.
float SphereRadius |
When Type is set to HitboxTypes.Sphere, this defines the local-space geometry for narrow-phase checks.
HitboxTypes Type |
The collision geometry type for this Hitbox.
|
get |
Index assigned to the collider of this hitbox on the lag-compensated snapshots.
|
getset |
Get or set the state of this Hitbox. If a hitbox or its HitboxRoot are not active, it will not be hit by lag-compensated queries.
|
get |
The index of this hitbox in the HitboxRoot.Hitboxes array on Root. The value is set by the root when initializing the nested hitboxes with HitboxRoot.InitHitboxes.
|
get |
World-space position (includes Offset) of this Hitbox.