Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help creating a wedge

I'm trying to create a wedge object (like a rectangular triangle). This wedge has to be created along a path, so I can't just use a slanted cross shape.

I've tried using the "Advanced Scale" mode in "Shape Extrusion", and this is almost what I need, except for the fact that it always scales points from the center, so the end result is more like an isosceles triangle.

Am I missing something obvious here? How would you create this? Would it be possible to add a "Translation" tab that mimics the Advanced Scaling options (i.e, a fixed translation amount in either X or Y & an animation curve to control it along the path)?

(04-23-2024, 03:10 PM)Thinkurvy Wrote: Would it be possible to add a "Translation" tab that mimics the Advanced Scaling options?

I just implemented this functionality myself... somewhat: only for Y displacement (as that was what I needed) and not on a separate tab, but inside the "Scale" tab... dirty, but quick '^^

In case anyone is interested, this is what I did:

In BuildShapeExtrusion.cs (in "Refresh" method) I replaced the top line with the bottom one:
//Matrix4x4 mat = Matrix4x4.TRS(path.Positions.Array[sample], pathRotation, scale);
Matrix4x4 mat = Matrix4x4.TRS(path.Positions.Array[sample] + (TransY != 0f ? (Vector3.up * TransY * TransMultiplierY.Evaluate(path.RelativeDistances.Array[sample])) :, pathRotation, scale);

I also created the relevant TransY and TransMultiplierY  in ScalingModule.cs, using the existing ScaleY and ScaleMultiplierY  as a reference.
Thanks for sharing your solution with others.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating splines from the surface of existing 2d colliders Monomirror 2 486 08-18-2021, 03:55 PM
Last Post: Monomirror
  Creating splines at run time jamesunity 6 2,995 07-17-2020, 10:17 PM
Last Post: jamesunity
  Creating a ring of rectangles, then create series of rings to create a cylinder mchangxe 2 2,362 09-07-2019, 10:17 AM
Last Post: _Aka_
  Creating a road dazz777 3 3,232 06-21-2019, 09:36 AM
Last Post: _Aka_

Forum Jump: