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.


Topics - TweenUser

Pages: [1]
1
DOTween & DOTween Pro / Sprite flipping on path loop
« on: March 17, 2016, 01:28:46 AM »
I have a sprite moving along a closed path in 2D (in the XY plane). As it moves along the path, it flips from one side to the other - always in the exact same places where the path is vertical. I'd like the sprite to stay on the outside of the loop all the way around.

The command I'm using is :

Tweener tween = object.transform.DOPath(waypoints, speed, PathType.CatmullRom, PathMode.Sidescroller2D, 10)
            .SetOptions(true, AxisConstraint.None, AxisConstraint.Z)
            .SetLookAt(0.01f, Vector3.forward, Vector3.up)
            .SetLoops(-1)
            .SetEase(Ease.Linear)
            .SetSpeedBased(true)


I had this working with HoTween. Any suggestions to get this working in DoTween? Is it something about my waypoints or the SetLookAt parameters?

Thanks

Pages: [1]