BezierTo breaks when aligned on the YZ plane
BezierTo produces a straight line, rather than the expected curve, when everything is aligned in the YZ plane.
I've attached an example below. The first polyline is the wrong one. The other two -- one with a slight adjustment and one in the XZ plane -- are behaving properly. Any deviation from alignment appears to make it work correctly.
using System.Collections; using System.Collections.Generic; using UnityEngine; using Shapes; public class ShapeTest : ImmediateModeShapeDrawer { public override void DrawShapes(Camera cam) { using (Draw.Command(cam)) { Draw.LineGeometry = LineGeometry.Flat2D; Draw.ThicknessSpace = ThicknessSpace.Pixels; Draw.Thickness = 4; using (var p = new PolylinePath()) { p.AddPoint(Vector3.zero); p.BezierTo(5 * Vector3.up, 5 * Vector3.up + Vector3.forward, Vector3.forward); Draw.Polyline(p); } using (var p = new PolylinePath()) { p.AddPoint(Vector3.zero); p.BezierTo(5 * Vector3.up, 5 * Vector3.up + Vector3.forward + Vector3.right * 0.001f, Vector3.forward); Draw.Polyline(p); } using (var p = new PolylinePath()) { p.AddPoint(Vector3.zero); p.BezierTo(5 * Vector3.up, 5 * Vector3.up + Vector3.right, Vector3.right); Draw.Polyline(p); } } } }
oh yeah I forgot to mention this has now been fixed c: