This commit is contained in:
CortexCore
2023-12-03 17:35:43 +08:00
parent ba342d6627
commit ba9f4eda80
702 changed files with 162078 additions and 21050 deletions

View File

@@ -7,6 +7,7 @@ namespace BITKit
{
public class LocationAdditiveElement : MonoBehaviour
{
[SerializeField] private bool useLateUpdate;
[SerializeField] private LocationAdditive locationAdditive;
[SerializeField] private Vector3 positionWeight = Vector3.one;
[SerializeField] private Vector3 eulerWeight = Vector3.one;
@@ -18,6 +19,18 @@ namespace BITKit
}
private void Update()
{
if (useLateUpdate) return;
Tick();
}
private void LateUpdate()
{
if (!useLateUpdate) return;
Tick();
}
private void Tick()
{
var localPosition = Transform.localPosition;
var localEulerAngles = Transform.localEulerAngles;