Is there a way to check if an object has collided with another without pasting the OnCollisionEnter onto one of those objects?
I do not want code everywhere all over objects, I’m a pro developer and that is the way you code when you’re 15 and just starting out.
I’m hoping for one of these two ways:
- Overriding the event method from my main controller script (the only script)
GameObject.OnCollisionEnter = function()
- Checking for a property value directly.
//get object collided with and do something
I’m really hoping there is a way to do this. Basically I just want to have all my code in one script file and not all over the place.