Hey I started coding in C# with Unity and I want to make a GameObject to follow a curved path defined by the function y=sqrt(x)-3 I looked online and I didn't see any tutorial or guide showing how to do this.
if (position_z <= 4 && position_z >= -4) {
float z = Mathf.Sqrt(position_x)-3;
transform.position = new Vector3 (position_x, 0, z);
}
The x and y position works but the z value is NaN.
Any idea how to fix this?