Тёмный

Unity 2D Platformer Tutorial 19 - Respawning the player 

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

This video demonstrates how to write a script to respawn the player after falling off a platform in a 2D platformer game in Unity.
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...

Хобби

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

 

31 май 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@josephwilkinson977
@josephwilkinson977 Год назад
Thank you so much! I really needed this for my college project, and you've helped me a lot with this. You've earned a subscriber!
@lordzool1034
@lordzool1034 11 месяцев назад
Fantastic video. I've been looking all over for alternatives to just reloading the scene since I wanted to implement a lives system which would've just been reset with the rest of the scene. This way my lives system works and there's a point to it, as the players progress won't be completely reset. Thank you so much :)
@kingspidey5080
@kingspidey5080 Год назад
Amazing tutorial! you earned a new subscriber!
@aylinaurora
@aylinaurora Год назад
THANK YOU SO MUCH!!! it worked perfectly!
@zhabiboss
@zhabiboss 2 года назад
Finally, a useful tutorial
@youratrucker20
@youratrucker20 Год назад
Hi this codes are not correct for some reason fallDetector.transform.position = new Vector2(transform.position.x, fallDetector.transform.position.y); please help!
@stefanocobelli887
@stefanocobelli887 2 года назад
great video, so usefull!
@TheAmazingPancake
@TheAmazingPancake Год назад
it works but i every time i move i turn small
@JameNotLame
@JameNotLame Год назад
Great Video
@rockende_sockegaming6935
@rockende_sockegaming6935 2 года назад
Thanks
@aquvity_
@aquvity_ Год назад
thx dude ^-^
@cuckhands
@cuckhands 2 года назад
How do I get it to reset the Velocity to what it was on Startup? I've tried setting the Velocity of the RigidBody to (0, 0), but it doesn't seem to work for Horizontal momentum/velocity. It works for preventing upward momentum, so the player doesn't rise if they hit "Jump" and then "Reset." This is the code I used: if (Input.GetKeyDown(KeyCode.R)) { transform.position = startPos; body.velocity = new Vector2(0, 0); } I'm using this as a "Reset Button" so I can't test the game easier since I don't require a fall box just yet. I am extremely new to Unity and C#, so any assistance would be greatly appreciated. Tbh, I am only using the Vector2 thing, because that seems to be how my Horizontal Movement input works, but I actually have no clue why it calls for the Vector2 instead of the RigidBody2D's Component(s).
@TheFortnitePacifist
@TheFortnitePacifist 2 года назад
I know probably less then you and this is probably dumb lol but maybe vector 3 instead
@izap4693
@izap4693 Год назад
thx
@2LostBoys
@2LostBoys 2 года назад
Cool
@hexa7580
@hexa7580 Год назад
Its not working on mine
@Fake_Stephen_Hawking
@Fake_Stephen_Hawking 9 месяцев назад
ensure that the "Is Trigger" checkbox is checked in the Collider2D component.
Далее
How to Set Up Nextcloud on Ubuntu 24.04 LTS
41:20
Просмотров 4,9 тыс.
HOW TO KILL AND RESPAWN PLAYER-Unity Tutorial
6:43
Просмотров 56 тыс.
Better Coding in Unity With Just a Few Lines of Code
15:27
At What Height Does my Iphone Break?
1:00
Просмотров 12 млн
Dad builds Foam Pit Jump! 😲
1:00
Просмотров 123 млн
28 мая 2024 г.
1:00
Просмотров 5 млн
Яжемать в скейт парке !
0:24
Просмотров 915 тыс.