I am a beginner in Unity and am taking the roll-a-ball tutorial and everything was smooth but when I got to section 06 of the tutorial my pickups didn’t work. the player just passes through the cubes and they don’t disappear as they did in the tutorial video.
here is my PlayerController script
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
public float speed;
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rigidbody.AddForce (movement * speed * Time.deltaTime);
}
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "PickUp")
{
other.gameObject.SetActive(false);
}
}
}
P.S. I ticked Is Kinematic and Is trigger