- Home /
Object detection / Targeting system [C#]
Hello, I'm working on a third-person detective game with clue finding and being able to question pedestrians on the street. That being said I have a camera that's able to orbit our player and I wanted to have an invisible object that always mirrored the movement of the camera object and retrieved information of object that it would hit (if there would be any sort of significant info to begin with.)
I'm wondering if anyone would know a good method for going about constructing the code for this and if there's a good tutorial for it. I'd like to avoid flat out buying a premade for doing this, as I've little money to work with at all.
If anyone is unclear as to what I'm speaking of I can provide screen shots of the layout.
Thank you.
Answer by OrbitSoft · Oct 23, 2013 at 07:04 PM
In my project we do the following:
Every Interactive object has a script that checks the distance between itself and the "hands" or the player, so you don't have to make a script for the player and specify every interactive object. I think this is the best way to do what you want.