I’m trying to get the Y axis of a direction vector so I can rotate a point 90 degrees to the left and right. I thought I had the logic right, but something isn’t quite right because the points that I create are not a straight line. Can anyone give me any advice?

Even if the axis was wrong, i would still expect the points to be a straight line because I’m rotating -90 to 90 around some distinct axis.

Given that “direction” is the direction from point “current” to point “next”.

```
Quaternion q = Quaternion.LookRotation(direction);
q.ToAngleAxis(out angle, out axis);
Vector3 left = Quaternion.AngleAxis(-90, axis) * direction;
Ray leftRay = new Ray(current, left);
left = leftRay.GetPoint(2);
Vector3 right = Quaternion.AngleAxis(90, axis) * direction;
Ray rightRay = new Ray(current, right);
right = rightRay.GetPoint(2);
```

Picture of the result. As you can see, there is no way that the three points can possibly line up.