In my Unity 2D Game, I need to move some items in the background, including:
- Street Lights
Then it feels like the player is moving. But actually, the items are moving backward.
Have a look at this video:
It'd be great if we automatically spawn these items & move. That's where we can get some help from a C# script. Here's how to do that:
- Create a script called "InfiniteMovingBelt.cs" in your project
- Then add the following content
- Then Create an "Empty Game Object" and add this script
After that, customize the parameters of this script as shown in the above video.
Since this might be a common task in 2D games, I think there is a much better solution than this. If you know a better solution, just let me know.
Custom Cursor with Input System - Unity 2020 Tutorial
Hi everyone, i'm a gamedev. In todays video i added a new prop, new spawn system for enemies and much more :)
CM 64 -
Should The Books Of Valour have mod support?
Switch to Dark Theme in Unity 2019 & 2020 for FREE