It’s called a collider box to begin with.
Try creating a game using the Unity Engine and you will soon learn how colliders work.
CCP could create script based on the following parameters rather easily.
Unity Engine Collider Manual
https://docs.unity3d.com/Manual/CollidersOverview.html
Collision callbacks for scripts
When collisions occur, the physics engine calls functions with specific names on any scripts attached to the objects involved. You can place any code you like in these functions to respond to the collision event. For example, you might play a crash sound effect when a car bumps into an obstacle.
On the first physics update where the collision is detected, the OnCollisionEnter
function is called. During updates where contact is maintained, OnCollisionStay
is called and finally, OnCollisionExit
indicates that contact has been broken. Trigger colliders call the analogous OnTriggerEnter
, OnTriggerStay
and OnTriggerExit
functions. Note that for 2D physics, there are equivalent functions with 2D appended to the name, eg, OnCollisionEnter2D
. Full details of these functions and code samples can be found on the Script Reference page for the MonoBehaviour class.
With normal, non-trigger collisions, there is an additional detail that at least one of the objects involved must have a non-kinematic Rigidbody (ie, Is Kinematic must be switched off). If both objects are kinematic Rigidbodies then OnCollisionEnter
, etc, will not be called. With trigger collisions, this restriction doesn’t apply and so both kinematic and non-kinematic Rigidbodies will prompt a call to OnTriggerEnter
when they enter a trigger collider.
The call back in this case would be a timer set on the Bumpers ship identification number, since all objects in the game are coded with unique item numbers similar to how worm holes are labeled WWR-045, TGD - 871, etc. when the timer reaches a certain number of hits within a certain period of time with the same object where the other object is moveable, unlike an asteroid or a station, the script would flag the Bumper as suspect for 15 minutes.
The script can be written.