Hi everyone,
I am having a tough time assigning variables through Physics.OverlapSphere.
The code is detecting the objects correctly through the tags and layers system, but for some reason I cannot assign a variable to the objects the cast is colliding with, see my code attached.
The object I am trying to assign the variable to has the variable set to pubic, so I really don’t understand why it just wont assign the transform correctly. No errors in my compile, but as soon as I try trigger it in-game it says “Object reference not set to an instance of an object”.
Any suggestions?
Thank you in advance.