I’m trying to transfer the bone rotation values from one skeleton to another. My first attempt was to get/set local euler angles from/to every bone, which worked fine!

Now, I would like to refine the script so that it becomes modular applicable to different characters without re-assigning every individual bone by hand. I tried to use the get/set bone transform/rotation functions, to which an animator variable can be assigned, and was hoping that I can simply change the dependencies with the animator variable. However, it doesn’t really transfer values from one skeleton to another. Maybe the problem is not related to the script but to the animator object itself. Any hint would be great!

What I want to achieve is creating character with 10 arms, like a Shiva (example image attached). Thus I need to assign the script to a several instances of the arm rig. Additionally, it needs a time offset for each arm pair. I didn’t get to this point so far, as I’m still struggling with the rotation transfer. However, from looking at the FlowCanvas functions, I assume that the time delay can be achieved by creating a list of the rotation values and read out later positions from this list, right?

Many thanks for any help!

Attachments:

Currently, I am using this nodes: Get Bone Transform -> Get local Rotation -> Set Bone local Rotation to get the values from the source skeleton and send it to the target skeleton. The debug mode shows that values are being sent from “Get local Rotation” to “Set Bone local Rotation”. But the target skeleton is not moving at all. I hope I have assigned all animator dependencies and settings correctly (e.g. activated “IK Pass” in the target animator), but there must be something I’ve missed (I’m new to Unity). Grateful for any hints. Here is an animated example of what I am trying to achieve: https://vimeo.com/248464203
Thanks for any help!

Hmm. Does the target skeleton has any animation of it’s own by any chance?
I think that even if you copy/paste bone transform values per-frame to a target skeleton, if that skeleton has any animation or is anyhow being controlled by an Animator component, then the Animator animation will “win” over the copy/pasted values.
For what you want to achieve, and considering I understood correctly, I think that you don’t even need an Animator controller on the target “duplicate” skeletons, but I might be wrong.

The animator component needs to be assigned to the “Set Bone Local Rotation” node (screenshot), although there is no keyframe in the animation. The description of that node says “Sets local rotation of a human bone during a IK pass”. Maybe it needs an additional node to trigger the pass? The values from the source are streaming fine, but somehow the target does not react.

Attachments:

Ahh. This method works in the IK Pass. That means that you probably need to call this method in “OnAnimatorIK” event instead of a regular “Update” event. To do so, please try using the Animator event node (“Events/Object/Animator”) and more specifically the “On Animator IK” port of that node, in place of the “Update” node you have now.

Just make sure, to assign the “tree pose” animator gameobject you have in the “target” animator field of that event node’s inspector.

Let me know if that works for you.
Thank you.

Attachments:

That works perfect, thanks a lot! Now it needs a time offset from the source to the target skeleton, so that the target skeleton plays the animation with a short delay. thus all arms will have an offset based on the delay of the motion. Couldn’t find a “time delay” node, but maybe there is a way to buffer the rotation values for a certain time and read it out after a given time constantly. Or an array in which values are stored every 1/30 seconds and then been read out by ID (higher ID number would cause longer delay). Would be great if you could give me a hint how to approach this in flowCanvas. Many thanks!

There is actually a “wait” node, but I don’t think it will work for what you are after.
I will try create a “buffer delay” / “echo” node and post it here for you once ready (expect tomorrow please)
I think it is an interesting node to have anyway! 🙂

That would be awesome! Many thanks!
Btw, that might be pretty close to a damper function too, where time based values are interpolated over a certain timespan. Could be quite useful to ease user controlled camera movements, soften jitter in mocap’s, etc…

Hello again and sorry for the late reply.
I’ve just manage to create this node you requested as well as a damp node (for floats and vectors).
Since I find them to be useful and will be included in the next, the best way for you to use them now would be to open up the file “Time.cs” and copy/paste the following code in there instead of sending you a separate package file.

Simply paste the code anywhere within the Time.cs file and within the namespace brackets of course.

Here is an example usage:

There is a big difference between Buffer and Damp of course:
– Buffer, will output the exact input value in the exact order they were queued. Buffer also works with all types.
– Damp, will instead output an interpolated value (float or Vector) towards the input value.