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.
|
void | OnDrawGizmos () |
| Draws this hitbox gizmo on Unity editor.
|
|
T | AddBehaviour< T > () |
| Wrapper for Unity's GameObject.AddComponent()
|
|
T | GetBehaviour< T > () |
| Wrapper for Unity's GameObject.GetComponentInChildren()
|
|
bool | TryGetBehaviour< T > (out T behaviour) |
| Wrapper for Unity's GameObject.TryGetComponent()
|
|
|
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.
|
|
|
virtual void | DrawGizmos (Color color, ref Matrix4x4 localToWorldMatrix) |
|
|
int | ColliderIndex [get] |
| Index assigned to the collider of this hitbox on the lag-compensated snapshots.
|
|
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.
|
|
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.
|
|
Vector3 | Position [get] |
| World-space position (includes Offset) of this Hitbox.
|
|
|
static void | DestroyBehaviour (Behaviour behaviour) |
| Wrapper for Unity's GameObject.Destroy()
|
|
Represents a single lag-compensated collider. Multiple component instances can be added anywhere in the hierarchy of a NetworkObject which includes a HitboxRoot.