So I saw in the demo folder "IKMotion_AttachmentEditing" so I used it with the LinkAnimatorLayer and it plays perfectly but then it automatically goes to the default position. So my question is how can I play that motion and keep the arms and weapon in the same position and then when I want it it should go to the default position. Thanks!
#IK Motion Layer Settings
1 messages · Page 1 of 1 (latest)
Hi, IK motions are automatically blended out, so the demo project uses a special AdditiveIK layer instead
So how do one create a new animation for inspecting a weapon? Is there any documentation I can follow or a video? Thanks!
Is it possible to move any IK bones such as hands to move the weapon at runtime?
The main idea is to have keyframes for WeaponBoneAdditive, which can be generated via the IK Extractor tool. It can help you to transfer motion from one bone to another
Sorry to bother you but how can I create a new animation with keyframes for WeaponBoneAdditive when I can't see what is moving with it? And I just tested the IK Extractor with random position movement referencing InspectStart animation and I get null error. I'm probably doing something wrong with the IK Extractor tool. All I want is to move the arms and the weapon into another position, more angled when inspecting it (attachment editing)
You can already use inspecting animations from the demo for attachment editing, no modifications required
Yeah and I do, but I want it more angled, to see more of the weapon on the screen because UI is overlaping because I render UI based on the world position of a gun. If you can understand what I want
I see, in this case you need to open up IK Additive Extractor, assign the original inspecting animation, then add the rotation offset around the forward axis (by default it's Z). Select the same bone as source and target, and select the character prefab root as a Root, then click apply
and reference animation should be the inspect start motion
Is that the same IK Extractor or something else? There is "Is Additive" variable on the bottom of the IK Extractor
it's the IK Extractor, in the past it had an "Additive" in its name, I still refer to it the old way). The "Is Additive" should be unchecked
So if i understood you, target and reference animation should be the same because im just adding rotation offset to it? So what should be on "from" and "to". "Root" is "Skeleton" on the default character right?
Yes, you can select the same reference animation, as it is only used when Is Additive is checked. From and To should be your weapon bone additive, Root is the prefab root, not the skeleton
Something like this?
yes
And then I get the error below
UnityEditor.AnimationUtility.GetEditorCurve (UnityEngine.AnimationClip clip, UnityEditor.EditorCurveBinding binding) (at <2201ab87e660427c974282df3bb3cf36>:0)
KINEMATION.FPSAnimationFramework.Editor.Tools.CurveEditorUtility.GetVectorValue (UnityEngine.AnimationClip clip, UnityEditor.EditorCurveBinding[] bindings, System.Single time) (at Assets/KINEMATION/FPSAnimationFramework/Editor/Tools/CurveEditorUtility.cs:12)```
this error means that the curves were not found in the animation
Yeah but you said to use that animation (in the demo folder) so if i cant use that animation how can i rotate the arms and the gun?
Is there a way to move them through a script? At runtime?
I'm sorry for bothering you, just trying to learn
No, you used a different animation #1264270013846782035 message
Assets/Demo/Animations/General
does your animation contain the weapon bone additve keyframes?
The issue is with the extractor logic actually, it's been fixed already in upcoming 4.6.0 patch. Go to the IKAdditiveGenerator.cs and replace the 46-line condition with this one !binding.path.EndsWith(_extractFrom.name)
Thanks, that works 🙂