Author Topic: is there a way to send a skeletonjoint to an xyz coordinate  (Read 1094 times)

Offline angelo

  • byte
  • *
  • Posts: 5
    • View Profile
is there a way to send a skeletonjoint to an xyz coordinate
« on: August 12, 2013, 12:22:36 am »
Im a noob and trying to use bones to mimic my movements in kinect.  Is there a way to send my shoulder, arms, and hands to the xy coordinates that im picking up from kinect?   ive been trying all sorts of things and nothings working correctly.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: is there a way to send a skeletonjoint to an xyz coordinate
« Reply #1 on: August 12, 2013, 08:38:25 am »
yes, you can do that. have a look at ProceduralAnimationSample to have an idea of how such calculations are done.

in summary, every joint's transformation is relative to its parent, you should update the transformation accordingly.

Offline angelo

  • byte
  • *
  • Posts: 5
    • View Profile
Re: is there a way to send a skeletonjoint to an xyz coordinate
« Reply #2 on: August 12, 2013, 10:48:56 am »
thanks.

but should i throw my xyz coordinates, say(100, 150, 50) directly to the ballPos in  targetJoint(currentPose, 10, new SimpleVector(-1, 0, 0), ballPos, 0.4f);

what mathematical calculations do i use first?  You used a lot of "Quaternion" math thats currently eluding me right now.  :)

also would the skeletonhelper class be useful for my case? (again, all the math in there is still unfamiliar to me right now)  ???

thanks again.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: is there a way to send a skeletonjoint to an xyz coordinate
« Reply #3 on: August 12, 2013, 05:25:55 pm »
yes, SkeletonHelper class will help. in particular applyJointMatrixP method takes care of applying a transformation regarding its parent.

I'll suggest starting with some reading about the subject and later doing simple transformations to joints like moving them slighly.

Offline angelo

  • byte
  • *
  • Posts: 5
    • View Profile
Re: is there a way to send a skeletonjoint to an xyz coordinate
« Reply #4 on: August 13, 2013, 04:18:33 am »
Thanks so much.  you've help is greatly appreciated. you're awesome