Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incorrect mesh alignment after extrusion on curved path
#10
That fixed it! Smile

I changed it so that the fIncrement is a very small value only for the start & end localF:
Code:
float fIncrement = (localF == 0f || localF == 1f) ? 0.000001f : 0.01f;

This change meant that now "BuildShapeExtrusion.cs" logs this info message "Look rotation viewing vector is zero" when computing pathRotation (line 1002), which I fixed changing this:
Code:
Quaternion pathRotation = Quaternion.LookRotation(
                        path.Directions.Array[sample],
                        path.Normals.Array[sample]
                    );

to this:
Code:
Quaternion pathRotation = path.Directions.Array[sample] == Vector3.zero ? Quaternion.identity : Quaternion.LookRotation(
                        path.Directions.Array[sample],
                        path.Normals.Array[sample]
                    );


Thank you very much for your help! Heart

Edit: That same "Look rotation viewing vector is zero" is now thrown on other places that try to access the Directions Array, like in "BuildVolumeCaps.cs". I'm just applying the same modification shown above on all of them.
Reply


Messages In This Thread
RE: Incorrect mesh alignment after extrusion on curved path - by Thinkurvy - 04-17-2024, 07:54 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to generate UVs along deformed and copied mesh? kubak 1 319 03-18-2026, 08:34 PM
Last Post: _Aka_
  Replace deform mesh on volume spots Kokoriko49 1 2,325 06-09-2025, 06:49 PM
Last Post: _Aka_
  Mesh Generation between two splines vatan 4 3,635 02-14-2025, 07:11 AM
Last Post: vatan
  Create Mesh Node, Make Static Options rickgplus 1 1,833 01-23-2025, 10:12 AM
Last Post: _Aka_

Forum Jump: