Hey all! Having an odd issue that I have been banging my head over for the last 24 hours. I have been trying to make spline meshes in real time, and I am almost there, but I keep having an issue where only one new mesh is drawn, no matter how many points I add.
In my world I have 2 spline points already made:
When I call “Draw All Spline Meshes”, the mesh shows up as expected:
Then when I call “Add New Spline Point”, then call “Draw All Spline Meshes” again, it shows as expected:
It draws the initial meshes, and one addition mesh added during runtime, but not 2+. All subsequent meshes are not generated unless I move them manually in editor, then call “Draw All Spline Meshes” again. So it is the same issue as my first post.
And now I get this. Now to figure out why moving all points and redrawing meshes fixes it… Seems like it forgets the other points locations somehow and running Set Location At Spawn Point refreshes it? But even if I do that and don’t actually move anything it doesn’t work. The points have to be moved for it to work.
Edit: Thinking this may actually be an engine bug… Anyone have any other advice here? The only way I can generate the meshes is if I move the points by some arbitrary amount before generating the meshes. If I don’t move them, they do not spawn…
Edit 2: @Everynone I see you have helped a few fellows before with spline meshes. Can you give me some advice?
Edit 3: Just figured out that the subsequent meshes are being drawn, but they are being drawn like this:
I took new function pictures if it helps make it easier to understand:
Edit: So it seems like there is nothing wrong with my code, I think. The issue has something to do with generating the mesh directly up. If I generate them on the X axis, it works exactly as I expect without moving any points.
Yes I have seen that. I am guessing “render state” isn’t what I was thinking it was then. I thought it was the way the mesh is actually rendered in the world. I thought running Update Mesh would update its appearance. Guess I will just redraw them then. Thanks.
Actually I will just redraw the mesh between the points that changed.