I’ve loved construction and heavy equipment since I was a kid, so about a year ago, I purchased the Synty Studios Construction Pack. I didn’t get to use it until now. I started playing around with the vehicle and figuring out how to make the track work.
The track is simple if you only have one vehicle on site – all you have to do is move the Y offset on the track material. However, any vehicle that refers to the material will also have a moving track and this prevents you from having one track move more or less than the other as it does in turns. So, I cloned the material on each tracked vehicle and made it a member of the Vehicle class.
You can also get some other ideas from this video.
I switched vehicles by modifying the Unity Standard Assets Vehicle package – the CarController script to be more specific. There are no major changes, but things like WheelEffects are not implemented and vehicles change their bodies by calling RigidBody.AddForce instead of accessing RigidBody.velocity directly. Turning is also done via the Rigidbody method compared to the original way done on the car controller script.
Getting in and out of the vehicle is quite easy and I made a video of it here. That video, incidentally, has accounted for about forty subscribers on my YouTube channel, so I think it’s a system that a lot of people are interested in. If you just want the code without the video, it’s here on my GitHub.
I created a basic delivery system where NPCs would carry objects from one place to another. There’s no other way to explain it because that’s what Amazon drivers and other delivery services do. The implementation is a little more complicated because NPCs rely on a state system where they may be idle, traveling, or in the process of picking up or dropping off a package. It’s very simple but when you see two delivery units working together; that is, when one NPC drives his package down the street with a forklift and drops it off for another NPC to pick it up with a wheelbarrow (unrealistic but whatever), it’s at least interesting to see them “working together”.
Gaming Hub
A gaming hub can refer to a central platform or space dedicated to gaming, where players can access games, interact with other gamers, and enjoy related content.