Game Development Community

Bone Rotation

by Crimson Rum Khulay Gin · in Technical Issues · 11/01/2007 (10:03 pm) · 2 replies

Hello everyone guys :)

Is there a way to have bone angles manually set and/or extracted in TorqueScript or is this only doable through the source code (I don't own the SDK)? Perhaps something like:

BoneRotate(EntityID,BoneID); sets angle

BoneAngle(EntityID,BoneID);returns angle

Thanks :)

#1
11/01/2007 (10:25 pm)
I don't think there is a way to do this in script (that is to say, I don't think the necessary data is exposed). However, if you did own the SDK you could easily expose the TSShapeInstance::mNodeTransforms (a Vector of MatrixF) to script and do this. I may be wrong though, but doing this sort of thing is pretty low level, so I have a feeling not. Also, you'd have to know what space the transforms are in, since they're parent-relative until after the shape instance has animate() called on it (after which they're in object space).
#2
11/01/2007 (10:32 pm)
Oh... that's too bad...I don't own the SDK so I won't be able to modify anything source code related.

Anyways, thanks a lot Ross. Have a great day :)