How to make DOOR ANIMATION [Unity 2020]

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

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

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

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

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

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

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

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

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

    Pivot noktası nasıl ayarlanıyor

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

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

  • @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 4 ปีที่แล้ว

    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 7 หลายเดือนก่อน +1

    yarım anlatmıs

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