Hi!
Related to the following discussions,
http://moi3d.com/forum/messages.php?webtag=MOI&msg=8747.1
http://moi3d.com/forum/messages.php?webtag=MOI&msg=8865.1
I developed a "RotateAnimator" macro that allows to more easily cascade "joints" and "bones" in order to create i.e. something like a robot arm:
The idea is that an animated object consists of a series of "joints" and "bones", where the "bones" can be rotates around the "joints":
Internally, the macro uses the "Orient" node and the "RotatePts2" node:
Here, first the "joint" is oriented to an optional "parent" RotateAnimator and then the "bones" and an optional "child" RotateAnimator are oriented to the rotated "joint".
That works pretty well for rotations around rX any rY, but rotation around rZ is not working as expected: only the bones of the current RotateAnimator will rotate but the bones of the children RotateAnimators will not.
I have attached a simple robot arm as an example (see "RotateAnimatorExample.3dm" and "RotateAnimatorExample.nod") if somebody is curious to try this out.
Please note, the "Joint" needs to be a single line as the macro uses "getCrvSFrame". The input for "Bones" can be any number of concaternated objects.
TODO:
* Investigate why rotation around rZ does not work as expected.
* Create a "TranslateAnimator" that does tX/tY/tZ translations along the axises (i.e. for linear servos)
Feedback is highly appreciated
best regards
Bernhard
|