Breakable objects - short Unity tutorial

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии • 6

  • @radu_photo
    @radu_photo 2 года назад +3

    A cool addition would be to make the object pieces turn transparent / shrink over time before destroying them for a smoother effect. Very cool tutorial! Keep these videos going and you'll get to the top!

    • @DazeWare
      @DazeWare  2 года назад

      That's a great idea

  • @Spacecadet669
    @Spacecadet669 Год назад

    Nice job

  • @bobbville
    @bobbville 2 года назад

    Cool vid! Sub from me! 🥂

  • @theplayergt231
    @theplayergt231 3 месяца назад +2

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class Break : MonoBehaviour
    {
    public Rigidbody rb;
    public bool isBroken;
    // Start is called before the first frame update
    void Start()
    {
    rb.isKinematic = true;
    }
    // Update is called once per frame
    void Update()
    {
    if (isBroken == true)
    {
    rb.isKinematic = false;
    }
    }
    private void OnTriggerEnter(Collider other)
    {
    if(other.gameObject.tag=="Breaker")
    {
    isBroken=true;
    }
    }

    }