- Home /
Flying object x value for position keeps resetting itself
I have been trying to make a space fighter game after watching a few tutorials and watching a couple of videos (after many hours of coding and adjusting) i have realised that when the x position value for my (flying) object exceeds 800 (or so) the object's x value resets its self there by resetting the position and direction of the object can any one help me solve this problem as i don't want to have this problem bothering me any more (trying to fiddle with code for past 4 hours) Thanks :)
A lot of the old top-down space games had the edges wrap around. If you've borrowed any code, I wouldn't be surprised if it had if(x>800) { x=0; }
somewhere in it.
Your answer
Follow this Question
Related Questions
How do I fix my rendering issues? 0 Answers
Blue screen in Unity? 0 Answers
Unity 3D - Model Failure! Please HELP ME!!! 0 Answers
Animation Deform 1 Answer