1
This commit is contained in:
@@ -48,6 +48,9 @@ namespace BITKit
|
||||
{
|
||||
currentEuler = Vector3.Scale(currentEuler, rotationWeight);
|
||||
currentPosition = Vector3.Scale(currentPosition, positionWeight);
|
||||
|
||||
currentEuler = Vector3.ClampMagnitude(currentEuler, 4096);
|
||||
currentPosition = Vector3.ClampMagnitude(currentPosition, 4096);
|
||||
|
||||
if (disabledRotation is false)
|
||||
switch (currentEuler, globalRotation)
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user