I am building an auto-targeting system and was wondering if there is a way to create an array of the objects currently being shown by the camera that I could then cycle through to find “shootable” targets. So far googling has not revealed much which makes me believe I am once again in a situation where I do not really know the technical term for what I am searching for.
Any help that any of you could lend would be most appreciated.
You can use OnBecameVisible and OnBecameInvisible to add/remove objects from the array. Keep in mind the editor camera also counts, which makes testing in the editor a little tricky sometimes.
Hey I made a simple JavaScript that might help but you’re going to have to go from there. The script is called follow and it makes an object follow another object. Like it keeps the same place but it follows the other object with it’s rotation.