Pick a specific part of Ninja

Started by ani.tumanyan, March 05, 2013, 05:38:42 PM

Previous topic - Next topic

ani.tumanyan

Hi everybody,

I'm trying to rotate specific parts of Ninja object. So I need to determine the specific bone the user has picked by touching on some part of the screen. Using collision detection technique I can understand which object was picked, but that's not enough as this returns only the whole object (the Ninja).

So my question here is,  how to know which bone was selected by a touch event?


Thanks in advance!
Ani

EgonOlsen

It might be possible to detect which bone is closest to the collision polygon/point. But i'm not sure...maybe you should ask this question in the Bones section!?

ani.tumanyan

Thanks Egon! I've posted this question in Bones section as well. Could not find a way to move instead of creating another one. Anyway, thanks for your quick reply :)!

ani.tumanyan

Hey Egon! I have a quick question here. As you mentioned it might be possible to get the closest bone to the collision point. I can get the collision position relative to the world space. Is that possible to find that position relative to the object (Ninja)? Because I can get joint's location relative to the object or relative to it's parent.


Thanks!

EgonOlsen

You could try to use the PolygonManager or an IVertexController to calculate some relation between the collision point and the mesh, but it might be a bit fiddly.