I have the Hermite Spline Controller. If anyone knows how, I need to know how to make an in game spline editor. I am trying to make something exactly like this:
Can anyone help?
I have the Hermite Spline Controller. If anyone knows how, I need to know how to make an in game spline editor. I am trying to make something exactly like this:
Can anyone help?
Thanks! How do I make the splines between the boxes solid cubes?
Build a hermite spline that passes through the centres of each of the nodes/cubes. Compute the length of this spline in world space. Divide the length by some amount that makes the lengths of each of your boxes something that makes sense. (So, of the spline was 100m long, and you want boxes that are 20cm square, then you’d want to divide the spline into 500 pieces.
At each of your 500 (say) divisions construct a square with it’s centre on the spline. You’ll need some idea of an up direction, which typically will be the world space y. These squares will want to be rotated so the are perpendicular to the spline at each location. (The spline should allow you to compute vectors in the direction of the spline, and with the world space up you can get a right vector using a cross product. Then create the rotated up using the cross product between the forward direction of the spline and the right vector. Use these to compute the corners of the square.) Then create a 3d extrusion using these squares by connecting their vertices.
Marvel as this extrusion of the squares forms a 3d spline you can edit using the cubes as control points.
This really is what I was thinking of doing. The only problem is, I do not know how to code splines. I definitely should have been more specific in my first post in the sense of what I need help with most(which is coding) Thank you for your detailed answers.