Method OnNetworkObjectParentChanged
OnNetworkObjectParentChanged(NetworkObject)
Gets called when the parent NetworkObject of this NetworkBehaviour's NetworkObject has changed
Declaration
public override void OnNetworkObjectParentChanged(NetworkObject parentNetworkObject)
Parameters
Type | Name | Description |
---|---|---|
NetworkObject | parentNetworkObject | the new NetworkObject parent |
Overrides
Remarks
When a parent changes, non-authoritative instances should:
- Apply the resultant position, rotation, and scale from the parenting action.
- Clear interpolators (even if not enabled on this frame)
- Reset the interpolators to the position, rotation, and scale resultant values. This prevents interpolation visual anomalies and issues during initial synchronization