• RuntimesUnity
  • How to do a run and shoot without avoiding to key the legs

Hi,

I have an idle, aim, run and a shoot animation.
Track 1 sets the animation to either idle, aim or run.
Track 2 sets the animation to shoot.

This is working fine so far, but the only limitation we are having is that we can't key the legs for the shoot, otherwise it'd override the legs of the run. Is it possible to have keyed legs for the shoot, but exclude those for when mixing it with the run? Like is there a way to give priority to certain bones on lower tracks?
I know I could solve this by having 2 different shoot animations (1 with keyed legs, one without) but I'm trying to see if that can be avoided.

Thanks,
Patric

Related Discussions
...

@paatz04 Unfortunately there is no direct "mask bones from being applied" feature available.

If you have lots of animations to duplicate (with leg keys removed in the duplicate), you could write a SkeletonDataModifierAsset to be assigned at the SkeletonDataAsset which duplicates certain animations and removes any leg keys from them.

On the animation side, there might be some tricks available to use IK mix values set to 0.0 or 1.0 to enable and disable parts of your animation, however I think that this will be a rather complicated setup which creates more work than it saves.

You could also modify the source code to add a masking feature yourself based on name strings, however I'm afraid this would be too much effort as well.

If anyone knows other solutions or workarounds, please don't hesitate to share your wisdom below! 🙂