- Home /
Question by
oscar70701 · Oct 22, 2018 at 06:04 PM ·
unity 2ddestroybreak
how to break with a big mass
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class DW : MonoBehaviour {
public GameObject DestroyedVersion;
public Vector2 com;
public Rigidbody2D rb;
void OnMouseDown ()
{
Instantiate (DestroyedVersion, transform.position, transform.rotation);
Destroy(gameObject);
}
}
Comment
Ok, but you have to actually explain what you want help with. Your code is completely irrelevant to your question and your question has not enough info to actually help you with anything.
Your answer
Follow this Question
Related Questions
Destroy a wall 2 Answers
Structural Stability 0 Answers
Help with Spawning & Destroying Background Objects in 2D 2 Answers
Do I need to destroy objects I'm not using? 4 Answers
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers