Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is curvyspline a good solution for a 2D rail grinding game?
#1
Hi there!

I've been looking for a good spline plugin to create a 2D rail grinding game. Essentially I need to be able to find the closest point on a spline and also detect collisions with the spline in order to 'attach' my character to the point on the spline closest to the collision point. The character then needs to be able to ride along the spline, and at any point can jump fromp the spline, and again attach onto another seperate spline.

I can see in the docs that the plugin supports finding closest point on spline and collider/mesh on spline which is great. I'm just wondering if there's anything in particular I'm missing? I think the other challenge I haven't really considered is actually getting the spline that i've collided with. Would this just be a matter of getting the spline component of the collided spline gameobject? The game is also going to be 2D and will probably have a ton of seperate splines (Lots of jumping from rail to rail).

If anyone could validate that this plugin has the features needed for me to achieve this, that would be greatly appreciated!

I just want to be certain before I fork out the money :-)
Reply
#2
Hi

From my understanding of your needs, Curvy Splines would do the job.

About your question: "Would this just be a matter of getting the spline component of the collided spline gameobject?"
The collided gameobject does not have the spline component in it. The spline component is in a spline gameobject. That spline gameobject is then used by an instance of Curvy Generator (another game object) to make the extrusion. In other words, the spline is an input of the Curvy Generator, while the generated mesh is its output.

That being said, making the link between the spline and the mesh should not be difficult. You can make a script that processes the Curvy Generator, by adding some custom component to the output gameobjects. That custom component will reference the input spline of the Curvy Generator. Then, at collision time, you retrieve the custom component from the collided gameobject, and thus get a reference to the associated spline.
Was my explanation clear enough?

I hope this helped
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Feel free to ask other questions
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Runtime error when using Curvy Generator with Game Object Deform studentloan 3 10 04-22-2022, 09:00 PM
Last Post: _Aka_
  How to send event to generated game object upon ControlPoint deletion? toxicfrog 8 184 12-03-2021, 02:02 PM
Last Post: _Aka_
  Board Game? L_Via 3 968 02-19-2021, 02:42 PM
Last Post: _Aka_
  Best practice when Instantiating game object with spline GenericJoe 1 1,387 08-22-2020, 02:40 PM
Last Post: _Aka_

Forum Jump: