Photon Fusion 2.0.3

Static Public Member Functions | Public Attributes | List of all members
LagCompensatedHit Struct Reference

Defines a lag compensated query hit result. More...

Static Public Member Functions

static operator LagCompensatedHit (RaycastHit raycastHit)
 Creates a LagCompensatedHit structure from the information on a Unity RaycastHit. More...
 
static operator LagCompensatedHit (RaycastHit2D raycastHit2D)
 Creates a LagCompensatedHit structure from the information on a Unity RaycastHit2D. More...
 

Public Attributes

Collider Collider
 PhysX collider hit. Null in case hit is a Fusion Hitbox or a Box2D hit. More...
 
Collider2D Collider2D
 Box2D collider hit. Null in case hit is a Fusion Hitbox or a PhysX hit. More...
 
float Distance
 Distance (if requested) to hit, at the lag compensated time. More...
 
GameObject GameObject
 The Unity Game Object that was hit. Its data is not lag compensated. This is either the Hitbox's or the Collider's gameObject, depending on the object hit being a lag-compensated Hitbox or a regular Unity collider, respectively. More...
 
Hitbox Hitbox
 Fusion's Hitbox. Null in case the hit was on PhysX or Box2D. More...
 
Vector3 HitboxColliderPosition
 The hitbox collider position on the snapshot. More...
 
Quaternion HitboxColliderRotation
 The hitbox collider rotation on the snapshot. More...
 
Vector3 Normal
 Surface normal (if requested) of the hit, at the lag compensated time. More...
 
Vector3 Point
 Point of impact of the hit, at the lag compensated time. More...
 
HitType Type
 Hit object source (PhysX or Fusion Hitboxes). More...
 

Detailed Description

Defines a lag compensated query hit result.

Member Function Documentation

◆ operator LagCompensatedHit() [1/2]

static operator LagCompensatedHit ( RaycastHit  raycastHit)
explicitstatic

Creates a LagCompensatedHit structure from the information on a Unity RaycastHit.

Parameters
raycastHitThe RaycastHit used as source.
Returns
The built LagCompensatedHit structure.

◆ operator LagCompensatedHit() [2/2]

static operator LagCompensatedHit ( RaycastHit2D  raycastHit2D)
explicitstatic

Creates a LagCompensatedHit structure from the information on a Unity RaycastHit2D.

Parameters
raycastHit2DThe RaycastHit2D used as source.
Returns
The built LagCompensatedHit structure.

Member Data Documentation

◆ Collider

Collider Collider

PhysX collider hit. Null in case hit is a Fusion Hitbox or a Box2D hit.

◆ Collider2D

Collider2D Collider2D

Box2D collider hit. Null in case hit is a Fusion Hitbox or a PhysX hit.

◆ Distance

float Distance

Distance (if requested) to hit, at the lag compensated time.

◆ GameObject

GameObject GameObject

The Unity Game Object that was hit. Its data is not lag compensated. This is either the Hitbox's or the Collider's gameObject, depending on the object hit being a lag-compensated Hitbox or a regular Unity collider, respectively.

◆ Hitbox

Fusion's Hitbox. Null in case the hit was on PhysX or Box2D.

◆ HitboxColliderPosition

Vector3 HitboxColliderPosition

The hitbox collider position on the snapshot.

◆ HitboxColliderRotation

Quaternion HitboxColliderRotation

The hitbox collider rotation on the snapshot.

◆ Normal

Vector3 Normal

Surface normal (if requested) of the hit, at the lag compensated time.

◆ Point

Vector3 Point

Point of impact of the hit, at the lag compensated time.

◆ Type

HitType Type

Hit object source (PhysX or Fusion Hitboxes).