- Home /
destroying a cube
Can you help me i'm trying to have my humanoid AI destroy a cube while doing jumping jack animation, and it not working.
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerAI : MonoBehaviour { private void OnCollisionEnter(Collision col) { if (col.gameObject.name == "Cube"); } }
Comment
Your answer
Follow this Question
Related Questions
Use Collider like a radar... 1 Answer
Why does this script check for raycast collision? Is it necessary? 1 Answer
OnTrigger event when colliders are already touching eachother 1 Answer
Limiting rigidbody physics influence on another rigidbody 0 Answers
handling collision with two objects of the same tag 1 Answer