NetworkTRSP is an abstract base component which implements Area Of Interest specific handling needed for all transform and rigidbody sync components to be compatible with Fusion's Area Of Interest system.
NetworkTRSP is the base class for all Fusion Transform and Rigidbody sync components (such as
NetworkRigidbody), and may be used as the base class for any custom sync components which need to be compatible with Area of Interest handling or any future custom Shared Server plugins.
TRSP is an acronym for Translate/Rotation/Scale/Parent (Translate refers to Position). These are the primary properties of a Transform.
This property returns true if the
NetworkTRSP is on the same GameObject transform as the
NetworkObject, and indicates that this
NetworkTRSP represents the position value for the
NetworkObject itself. This data is used for Area Of Interest determinations for that
This will return false for
NetworkTRSP derived components on child GameObjects (such as a hand or a head), as these transforms do not represent the world location of the Network Object.
SetAreaOfInterestOverride() allows a
NetworkTRSP derived component (such as
NetworkRigidbody3D) to specify that another
NetworkObject's position is to be used in determining Area Of Interest, instead of its own position data.
Effectively, this allows a
NetworkObject to assign another
NetworkObject as its AOI proxy. For example, if a Player picks up a Network Object and carries it in their hand, you will want that carried Object to have its
AreaOfInterestOverride be the Player. This is because the carried object is now reporting its local position, which is invalid for AOI handling. It instead will want player interest to be the same as the Player carrying it.