Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with an infinite runner game using Curvy Plugin.
#1
Hello,
I am workning on an infinite runner game, and I am using curvy as it provides smooth movements.

Now the plugin works perfectly as expected on the single lane paths.
But I have few paths that split into two or three paths.

There are two problems I am facing
- The region where it splits, the movement of the player is not smooth enough.
- The movement of the player is limited to the curvy splines. (For example if the player is moving on the far left lane, he will keep moving on the same lane, I want to make it such that player can choose for a specific period to switch to the right lane even if he is on the left lane).

Right now what I did is, a spline controller follows the spline, and left and right movement is handled based on horizontal input, and the child of the controller's local position is changed according to the input.

On the split intersections it calculates the input, and diverts the player accordingly to the respected splines.
Which is fine upto an extent, but I want to give more power to user, so that it doesn't feel like there is an invisible wall that doesn't allow to switch between splines where they do not intersect.


I apologise for the vague description, but I'll be happy to fill in with more info if needed.

I would really appreciate it if anyone can suggest what can I do to keep the same smooth movement on the intersections too.

I have attached a few screenshots of the split paths and intersections.
               

Thanks in advance,
Ajay.
Reply
#2
Check the 50_EndlessRunner example, it shows one way to handle "lane" switching.

Does that help?
Reply
#3
(05-18-2016, 07:18 PM)Jake Wrote: Check the 50_EndlessRunner example, it shows one way to handle "lane" switching.

Does that help?

Hi, thanks for the quick reply.
Yes, I did check that example, it uses connections..but that didn't really help much.
Reply
#4
It doesn't use connections to switch between lanes.
Reply
#5
Oh, I did see use of connections between the splines.
Can you suggest where should I be looking at specifically ?

Thanks much.
Reply
#6
Yeah, RunnerController.Switch() and SplineController.SwitchTo(). Basically it just finds the nearest point on the target spline and move a dummy on that with the same speed as the original controller. Then it lerps between the Controller and the dummy until the transition is complete. Last, the controller uses the new spline.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information Curvy 7.0.0 is live _Aka_ 8 1,048 10-17-2020, 11:17 PM
Last Post: _Aka_
Information Curvy 7.1.2 is live _Aka_ 0 44 10-08-2020, 10:09 AM
Last Post: _Aka_
  Frequent runtime updates of Curvy Generator for simulating plant growth using Splines h4ck3rd4wg 6 192 10-02-2020, 07:57 PM
Last Post: _Aka_
  Using Curvy to achieve welding effect hjk1122 1 77 09-27-2020, 11:03 PM
Last Post: _Aka_

Forum Jump: