I’m trying to tween the rotation of the main camera that’s a child object, it’s parent is an object called Shake that just shakes with DoShakeRotate. The actual Shake parent object is shaking as evident by the transform values, but it isn’t visibly shaking until the child camera has finished tweening it’s rotation. Is there some reason it isn’t visibly shaking, even though the parent is rotating?
Do you use the two tween nodes one after the other, or do you make use of a “Split” node?
If you want the tweens to happen simultaneously, you need to make use of the “Split” node so that both tweens are executed at the same time. Otherwise, if you simply connect one tween node after the other, the second node will only execute when the first one is finished.
Actually, tween quaternion is affecting the Player camera but running from a different gameobject and DoShake is running on the Player from an event. I’m not sure if it’s even possible to split them up since they’re both running simultaneously and from separate game objects.
Yes, tween nodes continue because they are coroutines.
The reason why the Rotation is done first, is because you updating the rotation in the graph Update, while the Shake is done with a coroutine and as usual, normal Updates (eg graph updating) is done first and before Unity Coroutines update (coroutines are always updated last).
Is it possible for you to use Tween Rotation directly, instead of using Tween Quaterion + Set Rotation in update?
If you use Tween Rotation and Tween Shake (thus both run as coroutines) then the execution order will depend only on which node of the two was executed first. The first node to execute will also update first (since its coroutine is registered first).
Hmm. Cant, you simply replace the Tween Quaternion (along with the manual setting rotation from the Update port), with a Tween Rotation? For the explained reasons in my previous post, you need to either let DOTween update the tweens (using Tween Position and Tween Rotation) within its own update loop, OR use “Tween Vector3 -> Update -> Set Position” and “Tween Quaternion -> Update -> Set Rotation” nodes for both as well, so that both update from within the graph update loop.
This way you will ensure that both will be updated at the same update loop with an order of execution also being the same as the order of execution of the nodes.