Character Movement on Curve like path , Like in Temple Run 2 or Catch The Ark

HI,

i wann make game like Catch The Ark,

i have made path/map generation which works fine at all,

but i stuck totally in terms of character movement in curve like path, same as Temple Run2 or Catch the Ark, or Temple Run OZ,

i have tried with ray cast to make some fixed distance with respect to path borders, it works fine with straight map generation, but jitters with curved map/path!

please help me!

If you only need the player to turn right / left at curve sections, a trigger which gradually rotates the player 90 degrees left / right should suffice, but that’s just me thinking out loud, haven’t attempted anything of the likes.

I would try and add another GameObject, that’s only moving in the middle of the road, looking always forward, then have the player’s GameObject be a children of this.

Well, since those games are “tracks-like”, as in they have specific tracks in which the player can run in, you’ll probably need some kind of spline or path to define where those are, and place the player in relation to that path.

HI Lasent, first of all thankx for reply,

here i would like to say that, path which i have to follow are now straight, it is curve based , same like temple run 2 or temple run oz,

here problem is that how i can run GameObject in the middle of road/path??
and how i would achieve it would be always in the middle of path!

@LightSriker,

you mean i have to use Waypoint like thing, which player is following, m i right or anything else you suggest?

Here’s an example of one piece of road we use in a game;

You can clearly see the spline in the middle. The player always follow that to know how the road is curving.

hi yes it is showing , but i also have player to bound on left and right side of path, like in temple run 2 and oz, so that i cant collide with walls and not jittering!

user will have full control of player with tilting of device, but player will not go beyond borders and also follows path whr user left player!

hey! did you solve your problem? i have the same issue and don’t know the solution how to move to the right/left in the middle of the road.
please help :slight_smile: