Тёмный

Unity 2D Platformer Tutorial 17 - Making the player look in both directions 

Daniel Wood
Подписаться 20 тыс.
Просмотров 8 тыс.
50% 1

This video demonstrates how to write code to make the player look in both directions when moving in a 2D platformer game in Unity (the player sprite will flip to face left when the player walking to the left, and flip to face right when the player is walking to the right).
Code for this tutorial - github.com/danielkwood/Unity2...
Unity website - unity.com
GitHub - github.com/danielkwood/Unity2...
Free Pixel Space Platform Pack - assetstore.unity.com/packages...

Хобби

Опубликовано:

 

16 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@PrizRumz
@PrizRumz 2 года назад
Bro you're so under rated this series is literally perfect for a beginner. Much appreciated bro seriously I've learned so much
@SlimeyDev
@SlimeyDev 2 года назад
Tis REALLY helped me! Thx keep making videos like this!
@rafaelguarniere3307
@rafaelguarniere3307 2 года назад
Wow! such a simple resolution!!!! Nice video
@ElateTugboat
@ElateTugboat 2 месяца назад
Really well done, thank you!
@duarte6653
@duarte6653 2 года назад
a bit latte but thanks! Great video hope you continue to do this kind of videos!
@isacic140
@isacic140 2 года назад
thx for this video
@Pentagram010
@Pentagram010 Год назад
I'm curious why you changed the scale instead of using flip.
@jeffrymartebonifacio8937
@jeffrymartebonifacio8937 Год назад
Thanks
@petervanikiotis5659
@petervanikiotis5659 2 года назад
thank you!!!!!!
@Greenie.293
@Greenie.293 Год назад
Im getting an error message and it says Assets\Scripts\PlayerMovement.cs(43,60): error CS1503: Argument 2: cannot convert from 'double' to 'float' Any tips?
@noobeditor2905
@noobeditor2905 Год назад
you shoud write "f" after writting the scale number in your code
@dahugo9740
@dahugo9740 2 года назад
i have a bit of a problem, if i go back to unity it says this: Assets\Scripts\PlayerMovement.cs(30,30): error CS1002: ; expected
@FanOfBricks
@FanOfBricks Год назад
that means you forgot to set a ";" behind one of the codes
@offthebooksmusic
@offthebooksmusic 2 года назад
i'm having the issue where my player defaults to facing right when there is no input. i can think of a few ways to fix this but i feel like i'm overlooking a very simple way to store the last input. any tips?
@blaze595
@blaze595 2 года назад
Are you potentially just using just an 'else' instead of an 'else if' condition for your second movement direction? Because that would definitely cause a 'default direction' issue.
@offthebooksmusic
@offthebooksmusic 2 года назад
@@blaze595 no i tried your bit of code exactly. my movement code is different but shouldn’t have caused any issues. managed to get it to work by using a very confusing flip function. messy but it works!
@blaze595
@blaze595 2 года назад
@Andrew Scott Grace Well im not the guy who made the video; but as long as you got it to work that's the main thing! 👍
Далее
СКОЛЬКО МОИХ ТРЕКОВ ТЫ ЗНАЕШЬ?
00:41
Idle, Run and Jump Animations - Platformer Unity 2D
10:13
2D Player Movement In Unity
5:34
Просмотров 399 тыс.
Math for Game Programmers: Building a Better Jump
25:43
Super gymnastics 😍🫣
0:15
Просмотров 93 млн