This project consisted of 4 scripts. A script to put on the ball, a script that keeps track of every basketball in the level, and two scripts for the two sets of colliders I had in the hoop. The ball needs to go through both the colliders set up on the hoop in the right order within a certain amount of time to prevent cheap hoops, like barely touching the inside of the hop then bouncing out or throwing it up from the bottom. WIthin this system, ideally, you would need to make the shot legitimately for it to count.Â
BBall.cs
This script sits on the ball itself
BBallTracker.cs
This script keeps track of all basketballs in the level and allows you to change the list on the fly
BBallHoop.cs
This script sits on the top collider of the basketball hoop
BBallHoop2.cs
This script sits on the bottom collider of the basketball hoop