This commit is contained in:
mischa 2024-10-17 11:03:17 +02:00
parent 92a76a7232
commit bd504bba66

View File

@ -96,10 +96,6 @@ public class NetworkTransformHybrid2022 : NetworkBehaviour
[Range(0.00_01f, 1f)] // disallow 0 division. 1mm to 1m precision is enough range.
public float scalePrecision = 0.01f; // 1 cm
// squared values for faster distance checks
float positionPrecisionSqr;
float scalePrecisionSqr;
// selective sync //////////////////////////////////////////////////////
[Header("Selective Sync & interpolation")]
public bool syncPosition = true;
@ -119,6 +115,11 @@ public class NetworkTransformHybrid2022 : NetworkBehaviour
public bool showOverlay;
public Color overlayColor = new Color(0, 0, 0, 0.5f);
// caching /////////////////////////////////////////////////////////////
// squared values for faster distance checks
float positionPrecisionSqr;
float scalePrecisionSqr;
// initialization //////////////////////////////////////////////////////
// make sure to call this when inheriting too!
protected virtual void Awake() {}