Sorry if this is in the wrong section, this discussion site isn’t working for me and I have like 5 frames to select anything
I’m trying to make a conveyor factory game where a box moves on a conveyor and does stuff, but right now I’m just completely stuck on how to make it so the box, when on the conveyor, it moves in a direction according to the type of conveyor under it.
Mostly just not sure where to start with this, any tips would be helpful
What sort of scale of factory game are we talking about here? Like a simple puzzle game scope, or something along the lines of Factorio? The answer is very different between the two.
Factorio but super dumbed down really. Box goes on conveyor, when box is dropped off somewhere, thing happens to it and it gets turned into something else to be used elsewhere.
What you see in games like Factorio are really the opposite. It’s not an object on a conveyer belt getting pushed along, it’s the conveyer belt simply showing a visual representation of what is moving across it.
In broader terms, a lot of game is being simulated as pure data, with your visuals mostly being a representation of this data layer. In Unity terms this would consist of having lots of regular C# structs and classes (ones that don’t inherit from MonoBehaviour or ScriptableObject) being manipulated from more top-level system; or using one or more solutions from the DOTS tech stack.
If this does sound fairly advanced… this sort of stuff kinda is.
Though you could look at using triggers on the conveyer belts as a simple solution, or pass a reference of the object to the belt, that it moves along until it reaches the end of it, before it passes that to the next belt in the chain.
The main things to remember is that this should be looked at from the perspective of a belt moving an object on it, and not an object being pushed by the belt its on.
1 Like