This document is about: FUSION 2
SWITCH TO

NetworkTRSP

NetworkTRSP

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.

Usage

NetworkTRSP is the base class for all Fusion Transform and Rigidbody sync components (such as NetworkTransform and 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 Definition

TRSP is an acronym for Translate/Rotation/Scale/Parent (Translate refers to Position). These are the primary properties of a Transform.

IsMainTRSP

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 NetworkObject.

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() Method

SetAreaOfInterestOverride() allows a NetworkTRSP derived component (such as NetworkTransform or NetworkRigidbody3D) to specify that another NetworkObject's position is to be used in determining Area Of Interest, instead of its own position data.

Area Of Interest Override
Area Of Interest Override.

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.

Back to top