Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jeff.madriaga

Pages: [1]
1
DOTween & DOTween Pro / DoShake on Camera position has drift
« on: November 20, 2015, 03:16:40 PM »
Hi,

I experienced something during a smoke test, where i left a tween running.

I'm trying to applying a camera shake with DOShakePosition on the camera transform. During the application, this happens frequently and sometimes on consecutive frames in a row (The tween has a duration of 0.5 secs, randomness - 90). Over time, the camera would drift off its initial position.

I ran some more tests where i call DOShakePosition every frame for 200 frames, in this sense i expect the tween to be overridden with the new starting position and drift. I added an OnComplete setting the position to the cached inital transform position. At the very least the last call should set it back to default position. After the 200th call the camera had drifted, even though its positioned looked correct.

Is it good practice to force cancel the existing tween, before setting a new one? I was under the impression DoTween handled that by default? Have you ever experienced drift in position?

Thanks

Pages: [1]