none
Best way of detecting whether a hand is in a box in 3D space RRS feed

  • Question

  • I'm pretty new to C# development (well this is my first big project in it) so I don't know the ins and outs of C# specific stuff, only the more commonplace ones in all languages.

    I need to detect whether the player's left or right hand is in a certain point in 3D space. The way I'm doing it at the moment is on every skeletal frame. I have an array holding the top left corners of the "boxes" that's closest to the sensor, then another array holding the bottom right corners furthest away. On every frame, it's looping through the left and right hand positions working out whether they're between all of the values for a box in those two arrays.

    There must be a better way of doing it and it's the only part of what I've made so far that's slowing it down somewhat.

    Sorry if it's a bit of a newbie question just that, well, you guys know best! Thanks in advance :)

    Thursday, December 15, 2011 4:01 PM