Go Map - Character animation problem

Hello everyone,

I know theres a thread dedicated to the GO Map asset, and i already posted this on there. But since theres been no responses lately, i decided to make this thread in hope someone who had worked with Go Map and has faced this problem might see this.

I followed the character animation provided by the creator of the asset. Everything is almost working perfectly, the character goes from Idle to walk animation when i start moving. The problem is it doesnt stay on the walk animation and switches from walk to idle over and over. Any ideas on what is causing this?

8186592--1066707--ezgif.com-gif-maker (3).gif

Did you make sure the animation is looping? (As in actually has “looping” ticked on import settings) ?

Incorrect configuration of animator controller would be causing this. Your animation clip should be marked as loopable, so while the animation is within “walking” node it will continue playing.

See basic animation tutorials.

Hey guys, thank you for replying.
In the tutorial says to leave both idle and walk animations without exit time or looping. I´ve tried what you said anyway but it didnt work. Took some prints of my set up, maybe you can spot something wrong. Feels like the walk animation just gets instantly canceled, maybe something wrong withe scripts idk




…

How about you drop that GoMap API for a moment and try to make a basic animator controller yourself?

Make a character that walks in place when you press space. And stops walking in place when you release space. Try doiing this.


At the moment behavior of your character indicates that transition leading from “walk” to “idle” is incorrectly configured.

This way it works fine, indeed. 8187744--1066977--gif3.gif

Just used a controller script that i already had and made the animations loopable, everything else is the same

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class movementcontrol : MonoBehaviour
{
    Animator animator;
    int isMovingHash;
    // Start is called before the first frame update
    void Start()
    {
        animator = GetComponent<Animator>();
        isMovingHash = Animator.StringToHash("isMoving");
    }

    // Update is called once per frame
    void Update()
    {
        bool isMoving = animator.GetBool(isMovingHash);
        bool forwardPressed = Input.GetKey("space");

        if (!isMoving && forwardPressed)
        {
            animator.SetBool("isMoving", true);
        }

        if (isMoving && !forwardPressed)
        {
            animator.SetBool("isMoving", false);
        }
    }
}

There’s no reason to make things so complicated.

void Update(){
     var forwardPressed = Input.GetKey("space");
     animator.SetBool("isMoving", forwardPressed);
}

Ok thank you :slight_smile:
Now what i really want is to know how to get it working with the GPS location

In your code fragment it appears that you’re trying to track animation state changes.

Why?

It is normally done other way around. You MOVE an object and while it is moving you set animator controller parameters.

So basically if your character is going somewhee, while it hasn’t reached location, you set isWalking to true.

Anyway, you’d need to try getting help from the creator of this asset. And if you want to tinker on your own, I’d suggest another exercise. Make a cube walk the map. While it is moving, set its color to red. If you can do that, you can make your animator controller work.

Agreed, if you are struggling to get an animation to loop properly, you probably need to practise more before attempting this. Either way as @neginfinity says you would have to contact the author of the asset for help if thats the path you want to continue to pursue.

You are trying to write a song for an entire orchestra, before even knowing how to read music :slight_smile:

Yes I’m already watching some tutorials, and i’m trying to learn more about it. I will try that cube exercise and hopefully learn from it as well.
Meanwhile, the creater of GO Map as responded to me and hes open to help me. I already explained my problem to him and if we can solve it, i’ll post an update here in case anyone faces this problem as well.
Thank you guys for the atention :slight_smile:

1 Like