PDA

View Full Version : skeletal animation in iphone




charpi
Feb 1, 2009, 04:19 AM
I got the data from a directX file exported from blender.
Can't seem to get my code working. Heres a simple algo:

-nstimer to call function accessArrays and drawArrays every 0.05s (20fps)

-every call increases currentFrame by 1

-get all required data(skinWeights, MeshVertices, animationMatrix,
boneMatrix,skinWeightsMatrix)

-(im not too sure about this step) calculate updateArray = ((skinWeightsMatrix X boneMatrix X animationMatrix)*skinWeights

-use updateArray to update my current mesh using dot product

-draw the new vertexArray using drawArrays

apparently i got alot of errors, the code still compiles, but i get weird values for resultArray and the model doesnt every move

attached is the code

thanks alot for your help