Every little thing in making a game is a hurdle, or at least a dozen google searches then a hurdle
Today wrote my own InputManager for multi touch, made it way smarter than I should have, it will look for a special component on the object you touch ( which it find by doing ray cast from the camera ) if none was found it can look at the object parent, and parents parent etc till it finds one, it can also contact ALL parents if they have a listener on them, simple really. I can also have it auto add a component to the touched object that caches all this so it is fast without having to perform lookups every time.. like a boss
So code to have good component orientated design to handle touching the iPad screen:
But that's a bit misleading as that contains code to auto add components and handle duplicate objects, singletons and such
But you get the idea, every little tiny thing, involves 100 other tiny things and so on
Lets not even think about how the ray cast to find the touched object itself is leaning on 1000's of lines of physic engine code and scene caches to aid in speed
Speaking of ridiculous code, I have been slowly write examples for various c# concepts and functionality...
All of this, and none of it actually visibly does a damn thing. In fact at his point all I have done in Unity is make a box move, but I decided to learn the language first so learn it I shall *grumble*
Today wrote my own InputManager for multi touch, made it way smarter than I should have, it will look for a special component on the object you touch ( which it find by doing ray cast from the camera ) if none was found it can look at the object parent, and parents parent etc till it finds one, it can also contact ALL parents if they have a listener on them, simple really. I can also have it auto add a component to the touched object that caches all this so it is fast without having to perform lookups every time.. like a boss
So code to have good component orientated design to handle touching the iPad screen:
But that's a bit misleading as that contains code to auto add components and handle duplicate objects, singletons and such
:-)
But you get the idea, every little tiny thing, involves 100 other tiny things and so on
Lets not even think about how the ray cast to find the touched object itself is leaning on 1000's of lines of physic engine code and scene caches to aid in speed
Speaking of ridiculous code, I have been slowly write examples for various c# concepts and functionality...
All of this, and none of it actually visibly does a damn thing. In fact at his point all I have done in Unity is make a box move, but I decided to learn the language first so learn it I shall *grumble*