Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can Curve Spline be used for an in game level editor.
#14
(05-04-2023, 04:26 AM)Lupos Wrote: I also had 1 follow up question regarding building in between points. I know you suggested calculating the distance but I'm having trouble knowing how I'd limit it.
I'm simply trying to make it so that for the size of my placed object (in this case its 1 unit) dont build anything at the start and end node of a segment.

I tried figuring out how to take the Distance and subtract .5f (half a unit) from it, and then converting that into a localDistance for the segments but I'm having trouble getting it correct.

It seems the generation spawns stuff starting from the first node, to the next node. Ideally I'm trying to find a way to almost essentially generate it from the center, outward to each point. However I don't really need that, I just need to make sure the start and end points don't create anything within half a unit from each point.

I provided an image below of what I'm trying to do. 

Each point is 1 unit, and then every block placed between the segment is 1 unit. I need them to fit between the points as best they can. This way the desctruction system can have towers and walls break without any intersections.

I think you should set the Range parameter (of the module that suits you) so that it sets a buffer at the beginning and end. The range is expressed as a relative distance. So if you want your range to start at 0.5u, then your range start value should be 0.5f/yourPathLength. You can access your path's length either via:
  •  CGPath.Length, if you are using the API to make your custom module, or
  • CurvySplineSegment.Length, if you are opting for using multiple Input Path modules, one for each segment.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
RE: Can Curve Spline be used for an in game level editor. - by _Aka_ - 05-04-2023, 09:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: