Tail Animator - Procedural tail animation for tentacles, simple capes, squids and more!

Still contemplating this IK possibility? Would. Be. Dope!

Hello,

I posted about this problem awhile ago and thought I found a fix by setting BlendToOriginal to 1 but its not playing an accurate animation. I will explain the problem again.

Im using TailAnimator_Blending and Im trying to disable it before my custom animation (character attack with tail). I set BlendToOriginal to 1 before I play the animation and even though it plays, its just not as accurate as it should because I dont think the tail returns to the original position when I set the BlendToOriginal to 1. It moves forward a little bit but not enough.

Do you have any ideas what else I can do to disable the tail animator before I play my custom animation?

Maybe some single bones don’t have rotation keyframes in animation and they’re offsetted and look different.
You can try enabling “Rotations not animated” before playmode (it will freeze keyframed animation) and use blend to original equal 1 and see if now it looks correct. If so, I suggest adding rotation keyframes in animation software to all tail segments, simpliest solution. I explained it here (9:51):
https://www.youtube.com/watch?v=B58YGtM8hPQ

If it is not that, then I would ask you to mail me.

1 Like

That works and I dont see a difference in the animation. Would there be a performance issue if I use this instead of adding rotation keyframe to all tail bones? Im not an animator and if I have to suggest this change it will cost me additional money. For the future animations I will make sure to use ask them to add rotation keys as well.

There will be no cost in performance, but I suggest finding which bones are making this difference and left marks only on them, if your tail is animated when character have idle animation / walk / run and you have toggled “Rotations not animated” on all of them, then animation will be less detailed, but you can switching it when you use your attack animation and all will be good too :wink:

1 Like

Hi, great asset!
Is there a chance to have option to choose 2D Colliders (instead of 3D) for the tail animator? Or some tip if changing the collider to 2d in source will work :slight_smile:
Thanks!

Hey I bought your asset today to animate a 2D characters cape, but whenever he changes direction the bones stick up into the air, any idea of how I could fix that? :slight_smile:

It depends how you want use collision, if you want use selective colliders you can use disabled 3D colliders (not deactivate game object, disable Collider component) tail animator will still detect them and they will not collide with world.

Also you can add Circle2D colliders to segments and it will collide with world objects, but other objects will not move tail model.

Soon I will work on refactor for tail animator, I will include better 2D support there.

For now negative scalling is not supported, you can try rotating character 180 degrees in Y axis for now.

2 Likes

Worked like a charm. Thank you! :slight_smile:

Hi, this tool seems really cool.
I was wondering if there’s any way to move the tail (or scarf which I’m working on) from an outside script. I want to create the effect that when there’s a blast of wind the scarf will be blown up in a certain direction. Just want to see if it’s possible to achieve that with your plugin.

Thanks!

You can do it in different ways, but catch this one.
I prepared this chunk of code for you, changing tail animator’s paramteres in courutine.
It looks like this:


And here commented code:

using UnityEngine;
using System.Collections; // For IEnumerator
using FIMSpace.FTail;

public class TailBoost : MonoBehaviour
{
    FTail_Animator tailAnim;

    void Start()
    {
        tailAnim = GetComponent<FTail_Animator>();
    }

    void Update()
    {
        if (Input.anyKeyDown)
        {
            StartCoroutine(Coroutine_TailImpact());
        }
    }

    IEnumerator Coroutine_TailImpact()
    {
        float elapsed = 0f; // Counter for elapsed time in while loops

        float startWaveRange = tailAnim.WavingRange; // Remembering waving range parameter
        float startPosSpeeds = tailAnim.PositionSpeed;
        float startRotSpeeds = tailAnim.RotationSpeed;

        // Boosting cape up
        while (elapsed < 0.15f) // Going up will take 0.15 of second
        {
            float progress = elapsed / 0.15f; // After 0.15 of second it will be equal 1

            // Going on x axis up to 60 degrees
            tailAnim.TailRotationOffset = new Vector3(progress * 60f, 0f, 0f);

            tailAnim.WavingRange = 2 * (1f - progress); // Setting for a moment waving range hight and go to zero
            tailAnim.PositionSpeed = startPosSpeeds + 10f * progress;
            tailAnim.RotationSpeed = startRotSpeeds + 10f * progress;

            elapsed += Time.deltaTime;

            yield return null; // Wait one game frame
        }

        // Wait short time for cape motion
        yield return new WaitForSeconds(0.1f);
        elapsed = 0f; // Reset timer

        // Going back to default rotation
        while (elapsed < 0.7f) // Going back will take 0.7 second
        {
            float progress = elapsed / 0.7f; // After 0.7 seconds it will be equal 1

            // Going from 50 degrees back to zero
            tailAnim.TailRotationOffset = new Vector3(60f - 60f * progress, 0f, 0f);

            tailAnim.WavingRange = startWaveRange * progress; // going with WavingRange back
            tailAnim.PositionSpeed = startPosSpeeds + 10f * (1f - progress);
            tailAnim.RotationSpeed = startRotSpeeds + 10f * (1f - progress);

            elapsed += Time.deltaTime;

            yield return null; // Wait one game frame
        }

        tailAnim.WavingRange = startWaveRange; // Bringing back exact value for this variable
        tailAnim.PositionSpeed = startPosSpeeds;
        tailAnim.RotationSpeed = startRotSpeeds;
    }
}

Is something like that you wanted to achieve?

1 Like

Yes almost! Thank you so much for providing this. I’ll try to follow your ways and experiment on that. Hope this function will be added into your plugin in the future!

Hey I’ve been using your ftail for a while now, and it is alround excellent. However I’m pooling units that get enabled and disabled a bunch of times. And I find after a while the tail gets stuck in a crooked angle without updating. it’s just frozen in an old position…

I’ve solved this before by making sure the ftail animator component gets enabled a few frames after the parent object gets enabled. That has been the only fix , re-re-enabling it etc once its dead, doesn’t seem to work.

using 1.3.7.1.

does this issue ring a bell? because now I’ve used it in another object, and my fix doesn’t work there anymore. so it stops responding after 2-3 disable/re-enables of the parent object.

Again big fan, wonderful asset, makes the dragon in the Falconeer pop :wink: much better than my wonky homebrew before.

Ever get around to testing this out?

By description it is looks like job for “Rotations Not animated” parameter. In upcoming Tail Animator V2 there will be option for automatically detect this issuse, please check this fragment of explanation video:
https://www.youtube.com/watch?v=B58YGtM8hPQ

But I am not sure is it’s this case.

Right now when I have some time I am working on new package using IK, I am planning to implement usage of that for tail animator too soon :wink: Look Animator will probably make use of it too.

I think none of my bones are animated, so that might be the cause.

I’ve now seeming solved it by having the Ftail disabled on parend disable and then enabled 0.1f later

bit hacky but seems to work.

when will you release 2.0?

I’ve fixed by changing your time.deltatime to time.unscaledDeltatime.

As I am using it in menus with timescale 0…

Easy fix, might be a quick add to your 2.0… For people using character portraits in menus and so forth

Cheerio
Tomas

I will be :wink:
6207987--681864--upload_2020-8-15_21-39-14.png

I am not sure, maybe in next two weeks

@FimpossibleCreations This asset just blew my mind! I have a pre-sales question:
I am creating a Monster that shots web at the player. Right now I am randomly spawning Webs at all direction where there was a collision. But its life less and doesnt interact with player. Using your asset, can I make the “web” attach itself to the player while the other end is still attached to the ground/ceiling? I want it to stretch for certain distance before tearing apart from player
Here is Reference screenshot from my game:

Thank you!
I am not sure which thing you want to animate, could you describe/show a little more?
I am right now working on Tail Animator V2, there will be IK feature, which probably could help here a bit.

2 Likes