Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can Curve Spline be used for an in game level editor.
#10
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.


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: Can Curve Spline be used for an in game level editor. - by Lupos - 05-04-2023, 04:26 AM

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: