Beginner's Guide: Make things move with keyboard input in P5js
Автор: Barney Codes
Загружено: 2022-08-21
Просмотров: 7736
Описание:
Code from video: https://editor.p5js.org/BarneyCodes/s...
If you want to make a game in P5js, you're probably going to want to be able to move the player around the screen using the keyboard. Even if you're just wanting to add a bit of interactivity to your P5js project, the keyboard is a great way to do it!
In this video I'll show you the best method - that even a beginner can understand - for reading the keys that have been pressed on the keyboard and how to use that information to update your player (or other object) to get them moving around the screen!
Follow me:
Support the channel: https://www.youtube.com/@BarneyCodes/...
Twitter: / barneycodes
Reddit: / barneycodes
Chapters:
0:00 Intro
0:15 The Player class
1:10 Movement vector
1:44 How NOT to do keyboard input
2:55 Correct keyboard input
3:52 Final result
#creativecoding #p5js #javascript
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: