Open emredesu opened 1 year ago
A path tween started with using
Vector3[] cubicBezierPath = new Vector3[] { waypoint0, transform.position, waypoint0, waypoint1, waypoint0, waypoint1, waypoint2, waypoint1, waypoint2 }; movementTween = transform.DOPath(cubicBezierPath, moveSpeed, PathType.CubicBezier, PathMode.Sidescroller2D, 20, Color.red).OnComplete(() => StartMoveTween()).SetSpeedBased(true).SetEase(Ease.OutQuad).SetUpdate(UpdateType.Fixed);
generates the following curvature (or the lack thereof - indicated with the red lines):
And this is how the same generated curvature looks using
Vector3[] cubicBezierPath = new Vector3[] { waypoint0, waypoint1, waypoint2, waypoint3 }; movementTween = transform.DOPath(cubicBezierPath, moveSpeed, PathType.CatmullRom, PathMode.Sidescroller2D, 20, Color.red).OnComplete(() => StartMoveTween()).SetSpeedBased(true).SetEase(Ease.OutQuad).SetUpdate(UpdateType.Fixed);
looks:
A path tween started with using
generates the following curvature (or the lack thereof - indicated with the red lines):![image](https://github.com/Demigiant/dotween/assets/16821868/448b2cdc-a88a-4581-b2bc-e3053aa1148d)
And this is how the same generated curvature looks using
looks: