Photon Fusion 1.1.9

Public Attributes | List of all members
InterpolatedErrorCorrectionSettings Class Reference

A set of parameters that tune the interpolated correction of prediction error on transform data. More...

Public Attributes

Single MaxRate = 10f
 
Single MinRate = 3.3f
 
Single PosBlendEnd = 1f
 
Single PosBlendStart = 0.25f
 
Single PosMinCorrection = 0.025f
 
Single PosTeleportDistance = 2f
 
Single RotBlendEnd = 0.5f
 
Single RotBlendStart = 0.1f
 
Single RotTeleportRadians = 1.5f
 

Detailed Description

A set of parameters that tune the interpolated correction of prediction error on transform data.

Member Data Documentation

◆ MaxRate

Single MaxRate = 10f

A factor with dimension of 1/s (Hz) that works as a upper limit for how much of the accumulated prediction error is corrected every frame. This factor affects both the position and the rotation correction. Suggested values are greater than MinRate and smaller than half of a target rendering rate.

E.g.: MaxRate = 15, rendering delta time = (1/60)s: at maximum 25% (15 * 1/60) of the accumulated error will be corrected on this rendered frame.

This threshold might not be respected if the resultant correction magnitude is below the PosMinCorrection or above the PosTeleportDistance, for the position error, or above the RotTeleportRadians, for the rotation error.

◆ MinRate

Single MinRate = 3.3f

A factor with dimension of 1/s (Hz) that works as a lower limit for how much of the accumulated prediction error is corrected every frame. This factor affects both the position and the rotation correction. Suggested values are greater than zero and smaller than MaxRate.

E.g.: MinRate = 3, rendering delta time = (1/60)s: at least 5% (3 * 1/60) of the accumulated error will be corrected on this rendered frame.

This threshold might not be respected if the resultant correction magnitude is below the PosMinCorrection or above the PosTeleportDistance, for the position error, or above the RotTeleportRadians, for the rotation error.

◆ PosBlendEnd

Single PosBlendEnd = 1f

The reference for the magnitude of the accumulated position error, in meters, at which the position error will be corrected at the MaxRate. Suggested values are greater than PosBlendStart and smaller than PosTeleportDistance.

In other words, if the magnitude of the accumulated error is equal to or greater than this threshold, it will be corrected at the MaxRate. If, instead, the magnitude is between PosBlendStart and this threshold, the error is corrected at a rate between MinRate and MaxRate, proportionally. If it is equal to or smaller than PosBlendStart, it will be corrected at the MinRate.

Note: as the factor is expressed in distance units (meters), it might need to be scaled proportionally to the overall scale of objects in the scene and speeds at which they move, which are factors that affect the expected magnitude of prediction errors.

◆ PosBlendStart

Single PosBlendStart = 0.25f

The reference for the magnitude of the accumulated position error, in meters, at which the position error will be corrected at the MinRate. Suggested values are greater than PosMinCorrection and smaller than PosBlendEnd.

In other words, if the magnitude of the accumulated error is equal to or smaller than this threshold, it will be corrected at the MinRate. If, instead, the magnitude is between this threshold and PosBlendEnd, the error is corrected at a rate between MinRate and MaxRate, proportionally. If it is equal to or greater than PosBlendEnd, it will be corrected at the MaxRate.

Note: as the factor is expressed in distance units (meters), it might need to be scaled proportionally to the overall scale of objects in the scene and speeds at which they move, which are factors that affect the expected magnitude of prediction errors.

◆ PosMinCorrection

Single PosMinCorrection = 0.025f

The value, in meters, that represents the minimum magnitude of the accumulated position error that will be corrected in a single frame, until it is fully corrected.

This setting has priority over the resultant correction rate, i.e. the restriction will be respected even if it makes the effective correction rate be different than the one computed according to the min/max rates and start/end blend values. Suggested values are greater than zero and smaller than PosBlendStart.

Note: as the factor is expressed in distance units (meters), it might need to be scaled proportionally to the overall scale of objects in the scene and speeds at which they move, which are factors that affect the expected magnitude of prediction errors.

◆ PosTeleportDistance

Single PosTeleportDistance = 2f

The value, in meters, that represents the magnitude of the accumulated position error above which the error will be instantaneously corrected, effectively teleporting the rendered object to its correct position. Suggested values are greater than PosBlendEnd.

This setting has priority over the resultant correction rate, i.e. the restriction will be respected even if it makes the effective correction rate be different than the one computed according to the min/max rates and start/end blend values.

Note: as the factor is expressed in distance units (meters), it might need to be scaled proportionally to the overall scale of objects in the scene and speeds at which they move, which are factors that affect the expected magnitude of prediction errors.

◆ RotBlendEnd

Single RotBlendEnd = 0.5f

The reference for the magnitude of the accumulated rotation error, in radians, at which the rotation error will be corrected at the MaxRate. Suggested values are greater than RotBlendStart and smaller than RotTeleportRadians.

In other words, if the magnitude of the accumulated error is equal to or greater than this threshold, it will be corrected at the MaxRate. If, instead, the magnitude is between RotBlendStart and this threshold, the error is corrected at a rate between MinRate and MaxRate, proportionally. If it is equal to or smaller than RotBlendStart, it will be corrected at the MinRate.

◆ RotBlendStart

Single RotBlendStart = 0.1f

The reference for the magnitude of the accumulated rotation error, in radians, at which the rotation error will be corrected at the MinRate. Suggested values are smaller than RotBlendEnd.

In other words, if the magnitude of the accumulated error is equal to or smaller than this threshold, it will be corrected at the MinRate. If, instead, the magnitude is between this threshold and RotBlendEnd, the error is corrected at a rate between MinRate and MaxRate, proportionally. If it is equal to or greater than RotBlendEnd, it will be corrected at the MaxRate.

◆ RotTeleportRadians

Single RotTeleportRadians = 1.5f

The value, in radians, that represents the magnitude of the accumulated rotation error above which the error will be instantaneously corrected, effectively teleporting the rendered object to its correct orientation. Suggested values are greater than RotBlendEnd.

This setting has priority over the resultant correction rate, i.e. the restriction will be respected even if it makes the effective correction rate be different than the one computed according to the min/max rates and start/end blend values.