Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.35k stars 351 forks source link

One particular Tweening behaviour works in the the Editor but doesn't work on an Android build #528

Closed Vivraan closed 2 years ago

Vivraan commented 2 years ago

Offending Code

internal void Init(in float initStartDistanceOffset, in float speedFactor)
{
    Following = false;
    startDistanceOffset = initStartDistanceOffset;
    // mod-assign so the change is visible in Debug mode
    startDistanceOffset %= pathCreator.path.length;
    distance = startDistanceOffset;
    speed = originalSpeed * speedFactor;

    DOTween.Sequence()
        .Append(
            transform.DOMove(
                pathCreator.path.GetPointAtDistance(distance), initRepositionDuration))
        .Insert(
            0, transform.DORotateQuaternion(
                pathCreator.path.GetRotationAtDistance(distance), initRepositionDuration))
        .AppendCallback(() => Following = true);
}

Expected Behaviour

(Video removed)

Actual Behaviour

(Image removed) (The gun and god rays spin as expected)

Steps taken to address issue

  1. DID NOT WORK Changed the sequence into raw tweens like so:

              transform.DOMove(
                  pathCreator.path.GetPointAtDistance(distance), initRepositionDuration);
    
              transform.DORotateQuaternion(
                  pathCreator.path.GetRotationAtDistance(distance), initRepositionDuration)
                  .onComplete += () => Following = true;