Demigiant Forum
Unity Assets => DOTween & DOTween Pro => Topic started by: abe on August 22, 2015, 04:32:27 PM
-
Hello. Is it possible to use orientation to path and DoPath Method?
-
Hello!
Sure, chain a SetLookAt (http://dotween.demigiant.com/documentation.php?api=SetLookAt) immediately after creating the tween.
-
I did this but nothing work. What is the parameters should be in SetLookAt method?
-
To follow the path you should set it like this:
myTransform.DOPath(...path parameters...).SetLookAt(0.01f);
-
Thank you! it works for me. but for some reason it disable sprite renderer and i do not see object texture. I use 2d game mode.
-
I got the issue in my project only. i cannot repeat it in another project. When we use "set look at" at object with spriteRenderer - spriteRenderer does not display texture.
-
I understand why sprite dissapears - for some reason when i enable setLookAt it start to rotate 2d sprite by x and y axis not only z. But when i added sprite to basic object i use to build path. It stops to do this. Mb it will be helpfull for somebody.
-
Hey, sorry for the late reply.
To avoid that issue when working with sprites, you can also set your PathMode parameter (in the DOPath method) to Sidescroller2D or TopDown2D, depending on how you're using your sprite.