How to make DOOR ANIMATION [Unity 2020]

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024
  • Hey everyone, welcome to my video.
    Don't forget to subscribe;
    ➤ bit.ly/3it8kVV
    In this video we'll see how to animate the door? How do we interact with it? I quickly answer questions such as how do we make the opening and closing sounds of the door.
    GitHub link of the project;
    ➤ ay.link/prdoor
    Download the code;
    ➤ ay.link/doorsc
    This is really simple and easy to do. Plus it can make your game more fun and realistic!
    #door #unity #animation

ความคิดเห็น • 15

  • @CanMujde
    @CanMujde  4 ปีที่แล้ว +1

    Abone olmayı unutmayın;
    ➤ bit.ly/3it8kVV

    • @ameleustv3093
      @ameleustv3093 3 ปีที่แล้ว

      Merhaba kodu başka bir yoldan iletebilir misiniz benim İnternet hizmetimde site güvenilmez uyarısı veriyor ve giriş yapamıyorum

  • @yahya8664
    @yahya8664 หลายเดือนก่อน

    Pivot noktası nasıl ayarlanıyor

  • @atesh0
    @atesh0 3 ปีที่แล้ว

    Eline sağlık, çok güzel olmuş.

  • @yusufesatkor4794
    @yusufesatkor4794 ปีที่แล้ว

    Github linki çalışmıyor ne yapmalıyım ?

  • @TYNOONE
    @TYNOONE 3 ปีที่แล้ว

  • @cuteanimalgalaxy422
    @cuteanimalgalaxy422 4 ปีที่แล้ว +1

    Açılıp kapanma hızını nasıl azaltabiliriz çok hızlı açılıp kapanıyor da

    • @CanMujde
      @CanMujde  4 ปีที่แล้ว +1

      Animasyonun keyframe lerinin aralığını daha da uzatarak ya da animatorde o animasyonu seçip speedini yavaşlatabilirsin.

    • @cuteanimalgalaxy422
      @cuteanimalgalaxy422 4 ปีที่แล้ว

      @@CanMujde Yaptım abi teşekkür ederim

  • @ameleustv3093
    @ameleustv3093 3 ปีที่แล้ว

    Merhaba kodu başka bir yoldan iletebilir misiniz benim İnternet hizmetimde site güvenilmez uyarısı veriyor ve giriş yapamıyorum

    • @ercaneyup57
      @ercaneyup57 3 ปีที่แล้ว

      using TMPro;
      using UnityEngine;
      public class Door : MonoBehaviour { public AudioClip open, close;
      public AudioSource source;

      public Animator animator;
      public TextMeshProUGUI[] info;
      public bool canInteract;
      public bool isOpen;
      void Start()
      {
      animator = GetComponent();
      }
      private void OnTriggerStay(Collider other)
      {
      if (!other.CompareTag("Player")) return;
      canInteract = true;
      }
      private void OnTriggerExit(Collider other)
      {
      if (!other.CompareTag("Player")) return;
      canInteract = false;
      }
      private void Update()
      {
      foreach (TextMeshProUGUI text in info)
      {
      text.gameObject.SetActive(canInteract);
      text.text = isOpen ? "\"F\" kapat" : "\"F\" aç";
      }

      if (!Input.GetKeyDown(KeyCode.F)) return;
      if (!canInteract) return;
      if (!isOpen)
      {
      animator.SetTrigger("Open");
      source.clip = open;
      source.Play();
      }
      else if (isOpen)
      {
      animator.SetTrigger("Close");
      source.clip = close;
      source.Play();
      }
      isOpen = !isOpen;

      }
      }
      using TMPro;
      using UnityEngine;
      public class Door : MonoBehaviour { public AudioClip open, close;
      public AudioSource source;

      public Animator animator;
      public TextMeshProUGUI[] info;
      public bool canInteract;
      public bool isOpen;
      void Start()
      {
      animator = GetComponent();
      }
      private void OnTriggerStay(Collider other)
      {
      if (!other.CompareTag("Player")) return;
      canInteract = true;
      }
      private void OnTriggerExit(Collider other)
      {
      if (!other.CompareTag("Player")) return;
      canInteract = false;
      }
      private void Update()
      {
      foreach (TextMeshProUGUI text in info)
      {
      text.gameObject.SetActive(canInteract);
      text.text = isOpen ? "\"F\" kapat" : "\"F\" aç";
      }

      if (!Input.GetKeyDown(KeyCode.F)) return;
      if (!canInteract) return;
      if (!isOpen)
      {
      animator.SetTrigger("Open");
      source.clip = open;
      source.Play();
      }
      else if (isOpen)
      {
      animator.SetTrigger("Close");
      source.clip = close;
      source.Play();
      }
      isOpen = !isOpen;

      }
      }

    • @ameleustv3093
      @ameleustv3093 3 ปีที่แล้ว

      @@ercaneyup57 Teşekkür ederim.

    • @ercaneyup57
      @ercaneyup57 3 ปีที่แล้ว +1

      @@ameleustv3093 önemli değil ama oluşturduğun c++ dosyasının adını Door yapmazsan kod çalışmaz

    • @ameleustv3093
      @ameleustv3093 3 ปีที่แล้ว

      @@ercaneyup57 Tamam anladım tekrardan teşekkür en yakın zamanda kodu uygulayacağım.

  • @xzodtx
    @xzodtx 4 หลายเดือนก่อน

    yarım anlatmıs