dotween
dotween copied to clipboard
DOShakePosition vibration is inconsistent and sometimes only works in scene window but not in game window
Hello, I have been working with DOTween PRO for a couple of months and it's been tremendously helpful! However, I ran into a bug yesterday that I think might be related to the one reported in issue #380.
It seems like the magnitude of the vibration might be inconsistent between scene plays in Unity. I believe there should be no randomness based on my code here:
if (DoShakeTween == null)
{
DoShakeTween = transform.DOShakePosition(1.8f, new Vector3(0.018f, 0, 0), 13, 0, false, false)
.OnComplete(() => AnimationFinished = true)
.SetEase(Ease.Linear)
.SetAutoKill(false);
} else
{
DoShakeTween.Restart();
}
The gif below demonstrates this issue. As you can see, it is shaking only a bit in the scene window and none at all in the game window. This seems to occur maybe 25% of the time. 75% of time, the magnitude of the shake is greater and it works as expected in both windows. I'm on version 1.0.310
.
Issue that pops up ~25% of the time:
Gif where shake is as expected:
Looks like a pixel perfect camera prevents the showing of the very small shakes.
I am using a pixel perfect camera so it's very possible it's related (this issue still exists for us).