Creating gameplay in DOTS
Lots of things we do in MonoBehaviours, like instantiating objects or getting other object data (for example, their position), are quite differently implemented in DOTS. In this section, we will examine how to achieve these things in DOTS:
- Moving using input and tag components
- Creating seeking missiles using component lookups
- Destroying the character with entity command buffers
- Dealing with errors in bursted code
- Instantiating missiles with entity Prefabs
- Making the camera follow our character
- Exploring other DOTS features
Let’s start by discussing how to modify our movement code to respond to input.
Moving using input and tag components
Let’s start creating gameplay by using input to move the cube. We need to change our movement job to provide it with the input values. We will do this the same way as we provided delta time by passing the input values to the job. In the next image...