Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- .../Curvy/Base/CG Modules/BuildShapeExtrusion.cs | 26 ++++++++++++++++++----
- 1 file changed, 22 insertions(+), 4 deletions(-)
- diff --git a/Assets/3dPartyTools/Curvy/Base/CG Modules/BuildShapeExtrusion.cs b/Assets/3dPartyTools/Curvy/Base/CG Modules/BuildShapeExtrusion.cs
- index b5b8f6951..59edffdb6 100644
- --- a/Assets/3dPartyTools/Curvy/Base/CG Modules/BuildShapeExtrusion.cs
- +++ b/Assets/3dPartyTools/Curvy/Base/CG Modules/BuildShapeExtrusion.cs
- @@ -102,11 +102,20 @@ namespace FluffyUnderware.Curvy.Generator.Modules
- [Label("Reverse Normal", "Reverse Vertex Normals?")]
- [SerializeField]
- bool m_CrossReverseNormals;
- - #endregion
- - #region TAB: Scale
- + [Header("Transpose")]
- + [SerializeField]
- + float m_TransposeX = 0;
- +
- + [SerializeField]
- + [AnimationCurveEx("Transpose X Curve")]
- + AnimationCurve m_TransposeCurveX = AnimationCurve.Linear(0, 0, 1, 0);
- +
- + #endregion
- - [Tab("Scale")]
- + #region TAB: Scale
- +
- + [Tab("Scale")]
- [Label("Mode")]
- [SerializeField]
- ScaleModeEnum m_ScaleMode = ScaleModeEnum.Simple;
- @@ -696,7 +705,16 @@ namespace FluffyUnderware.Curvy.Generator.Modules
- Quaternion R = Quaternion.LookRotation(path.Direction[sample], path.Normal[sample]);
- getScaleInternal(scaleFArray[sample], baseScale, ref scl);
- - Matrix4x4 mat = Matrix4x4.TRS(path.Position[sample], R, scl);
- +
- + // transpose shape
- + float transposeCurveXValue = 1 - m_TransposeCurveX.Evaluate(scaleFArray[sample]);
- + float multiplier = m_TransposeX * transposeCurveXValue;
- + Vector3 samplePos = path.Position[sample];
- + Vector3 samplePosForward = R * samplePos;
- + Vector3 pos = samplePos + samplePosForward * multiplier;
- +
- + Matrix4x4 mat = Matrix4x4.TRS(pos, R, scl);
- +
- Matrix4x4 matHollow = volHollow
- ? Matrix4x4.TRS(path.Position[sample], R, scl * (1 - HollowInset))
- : default(Matrix4x4);
- --
- 2.16.1.windows.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement