::Hi niko! It seems that the issue might have something to do with the moveDir
variable. From what I can gather from the video, it seems that the chunks only spawn when the player moves in the left direction and fails to spawn when moving in the right direction.
One thing I can suggest you to do is to double check the code in the PlayerMovement
script. It looks to me that the something might be wrong there. Since you don’t have a sprite for your player character you might have missed some important implementation.
Another thing I can suggest is that if you have not yet watched the Part 11 video, I encourage you to do so since revamped and made major improvements to the MapGeneration
script. In this part, we removed the MapGeneration
script’s dependency on the PlayerMovement
script so perhaps the issue you have been facing might be solved.
Hope this helps!
If none of these things work could you perhaps give more information about your code.