filmov
tv
How to OPEN A DOOR With KEY in UNITY - Easy Tutorial

Показать описание
In this video, you will learn how to make a door openable by collecting a key object, which can be something other, like a cylinder or a cube. The door will be animated every time the player approaches it. The door will only work if the player collects the key.
To open a door in Unity, you need to collect a key. You need to create a simple cylinder object (or any other) and possibly assign a material with the color (as you like). Then you have to resize it to the size that is slightly smaller than the player. Unlike the previous tutorial, this time you need to only add a script to the key object, which is pretty straightforward.
Add a simple script that will open the door once the key is collected. Don't destroy the key before opening the door! Put that line of code at the last part of the brackets.
If you find this video helpful, consider subscribing. I will make videos every week. Lastly, I will make more game development tutorials and other content related to game industry. These videos will help beginner game developers become better and make amazing games. There will be more videos related to 3D platformer, 2D platformer and other game dev related content.
Support the Creator of Kozmobot on the social networks!
To open a door in Unity, you need to collect a key. You need to create a simple cylinder object (or any other) and possibly assign a material with the color (as you like). Then you have to resize it to the size that is slightly smaller than the player. Unlike the previous tutorial, this time you need to only add a script to the key object, which is pretty straightforward.
Add a simple script that will open the door once the key is collected. Don't destroy the key before opening the door! Put that line of code at the last part of the brackets.
If you find this video helpful, consider subscribing. I will make videos every week. Lastly, I will make more game development tutorials and other content related to game industry. These videos will help beginner game developers become better and make amazing games. There will be more videos related to 3D platformer, 2D platformer and other game dev related content.
Support the Creator of Kozmobot on the social networks!
Комментарии