DOTS Gameplay: Basic Player Input and Movement

preview_player
Показать описание
In this episode, we demo a very simple means of connecting keyboard input to generate player movement. Create Components and Systems to translate and rotate a spaceship in a top-down environment!

TimeStamps:
0:27 Starter Project
0:57 Packages
1:57 Creating the Spaceship SubScene
5:04 DataComponents
5:38 InputData
6:58 MoveData
8:02 Adding Authoring Components in Inspector
9:09 PlayerInputSystem
14:00 PlayerMovementSystem
17:48 FaceDirectionSystem

Starter Project:

Final Project:

Software: Unity 2019.3.9 with HybridRender Version 0.4.2 and Entities Version 0.9.1 from the PackageManager

NOTE: issues have been reported with Unity 2019.3.14f running Windows (seems to be okay on MacOS on that version)

Also check out the previous videos in this series:
Unity DOTS: System Base

Want to learn more about DOTS and ECS? Sign up for our mailing list to get notified when the premium course releases:

Let’s build something cool together!
Рекомендации по теме
Комментарии
Автор

Most comprehensive ECS series on YouTube right now. Really appreciate your effort.

victrolaface
Автор

I like how you are going through every step in detail. Thank you for another great video!

shakofarhad
Автор

Your courses on Udemy and GameAcademy are excellent. I hope you continue updating this channel with more tutorials, a lot of game development student needs your content.

andersencastaneda
Автор

Thank you. I knew how to use an IComponentData, and Jobcomponent system, but I didn't know how to do a processing script for input. Now I do. Boss video. God bless.

GoodNewsJim
Автор

Just noticed you have a new dots video super awesome !I'll watch it when im done with work



I'm still waiting for the course man and please include physics with taging components man super

Salute

shirosurfer
Автор

Hi, would you consider making a video about how to do this using the new unity input system?

envilonscript
Автор

Great tutorial. Thank you. And about that ConvertToInt32, if you disassemble System.ConvertToInt32(bool) you'll see that it uses a ternary operator, selecting between 1 and 0. So probably compiler will inline this and that will produce the exact code (:

CanKarakuzulu
Автор

Great Vid. I Just wanted to add that if you were to recreate this project in Entities 0.11.0, you can add the range attribute to the movementData.turnSpeed variable within the MovementData Component. I've not tried this in other versions, but I know it works with here.

zacharym
Автор

I think the Translation component in the FaceDirectionSystem is not needed.

I don't know if you still make videos, it's been a year since your last one, but I would love more DOTS content, especially since its changing so rapidly. I went through many videos, articles and documentation and your videos are the best thing I've come across regarding DOTS.

omgawesomeomg
Автор

what if you want mouse position data? for InputData?

DeathxStrike
Автор

Unity should be paying you for those tutorials.

gregs_on_tracks
Автор

plz do a video that uses this with the new input system

anonymoussloth
Автор

How to control cameras and IU in DOTS?

Dream_Wood
Автор

Thanks for the well explained tutorial. How can you do mouse clicks on entities and UI using DOTS?

CalicoArchives
Автор

Thank u for your sharing! I love your channel. could u tell me how to play the animation in the ECS

nswell
Автор

What's the difference (pros and cons?) between ConvertToEntity and using SubScenes? When should I use which?

CalicoArchives
Автор

For the inputs wouldn't it be easier if you just make them all int (instead of bool) then cast in the direction.x = right - left, direction.z = up - down ?

saito
Автор

how the fuck you have so little subs and views ?
Best ESC/DOTS series here !

xontik
Автор

How to print message to console when using Unity Tiny?

prakyathd
Автор

Hi Wilmer, I've been enjoying these tutorials. I'm following along and building my own project with the skills you're demonstrating. I'm trying to spawn entities with player input using the component system setup. I have an input data component and input system that both work in the entity debugger, but I'm struggling to see how to connect these concepts with the entity spawning concepts in your intro to ECS videos. Since the Spawner uses Monobehaviour to call the InstatiateEntity method, is that method not accessible through the SpawningSystem I built using SystemBase? Can the "SpawningSystem : SystemBase" send data to the "Spawner : Monobehaviour" to call a method? Like if upKey is pressed, spawn entity. I would think the spawn system handles the logic and calls the method by referencing the Spawner, but that doesn't seem to work. Do you know any resources that can help me understand this issue?

croonymoons