Unity myDemoandNote 2
3D URP Collider RigidBody Auto Move : Mathf.Sin , [Range(0f,10f)] public float ampx = 1f; Spawn : public GameObject[] spawn; -) Instantiate(spawn[randomIndex], randowmspawnPos,Quaternion.identity); Check Number Tag : GameObject.FindGameObjectsWithTag("ball").Length; Edit Text Mesh Pro : TMPro.TMP_Text txt -) txt.text = "somthing"; Check Collision : OnCollisionEnter() Check impulse max : Vector3.Magnitude(collision.impulse); Check collider name : collision.collider.name Add Force : private Rigidbody rd; -) rd = GetComponent Rigidbody (); -) rd.AddForce(collision.impulse); Destroy Object : Destroy(gameObject); Replace Object : GameObject.Instantiate(replacement, transform.position, transform.rotation); Input Keyboard : Input.GetKeyDown(KeyCode.Space) Random : Random.Range(0, spawn.Length); How to Fracture : Use 2 Object Same body Intial -) Check collider first object if this is collider -) Instantiate Fracture Object and Destroy first Object #unity #3d