Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
Blend-Tree animations goes the opposite way

I'm trying to create a simple Blend-tree Animation that the player will be able to Run + Strafe + Walk Backwards. Now when I press play and walk straight all seem to be good (other than animation speed but that all right) but when I'm trying to go 180* it's doing his animation but still trying to go to the straightway as before.

Here is my code

public class AnimatorController : MonoBehaviour
{
    Player player;
    Animator anim;
    public float speed;
    // Start is called before the first frame update
    void Start()
    {
        player = GetComponent<Player>();
        anim = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        var x = player.moveVector.x;
        var y = player.moveVector.y;


        ChenRedo(x, y);
    }

    private void ChenRedo(float x,float y)
    {
        anim.SetFloat("VelX", x);
        anim.SetFloat("VelY", y);

        player.transform.position += (Vector3.forward * speed) * y * Time.deltaTime;
        player.transform.position += (Vector3.right * speed )* x * Time.deltaTime;

    }

Unity Blend Tree:

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda