- Home /
Question by
OshakieGittens61 · Sep 12, 2015 at 05:55 PM ·
gamerunning
How to make my character move endless?
o I'm working an endless runner game and i have created a script thats suppose to make the terrain move backwards but it doesnt work even i add the script to the terrain. The guys just runs with no movement. I must all note that im using a thirdperson controller as well as using this site as a guide: http://www.thegamecontriver.com/2014/06/subway-surfers-temple-run-like-game-set-ground-moving.htmlSo this is the script:
public class RunIllusion : MonoBehaviour {
//Material texture offset rate
float speed = .5f;
//Offset the material texture at a constant rate
void Update () {
float offset = Time.time * speed;
renderer.material.mainTextureOffset = new Vector2(0, -offset);
}
}
Comment
Your answer
Follow this Question
Related Questions
Game not working properly 0 Answers
Making a continuous runner... HELP!? 2 Answers
i want to make a temple run type game 2 Answers