Open Kronoxis opened 1 year ago
The problem with the SplineMesh is that when it compensates corners, it also inflates the scale of the mesh along other axes. The path generator works well with this because it's flat but for meshes that occupy volume along the Y axis, this becomes a problem. I'm not sure how to handle this in terms of design yet. We might need to run this operation separately for each local axis of the sample.
I have made the necessary modifications to leave original scale intact, and apply the compensation to X only. This produces the result below, which can be confirmed in the test branch
I believe this is also an issue in the path generator currently when it has an offset in Y - the Y offset seems to scale along with compensation. I will create a new branch for this fix soon.
The
PathGenerator
currently have the option to compensate corners for linear splines. This option however does not exist for theSplineMesh
component. I added the necessary code to make this work, check out the Discord forum post about this for a preview.You can also checkout the test branch for a test scene with the following tests:
This PR should not introduce any breaking changes, as the default behaviour of the
SplineMesh
remains unchanged. It simply exposes an optional setting to improve the mesh generation.