Passer au contenu principal
Version: bleeding-edge 🩸

Animations de Locomotion

Comment créer des animations de locomotion personnalisées pour les personnages.

Prerequisites

Before proceeding, please make sure you read Creating & Importing Assets Guide.

Il est désormais possible d'intégrer vos propres animations brutes de Locomotion dans le monde de nanos ! Avec les nouvelles méthodes de personnage, vous pouvez ajouter votre propre Standing, Proning et Crouching Blend Spaces pour travailler dans le personnage natif !

Espaces de mélange de locomotion

In Unreal, BlendSpaces are graphs where you can plot any number of animations to be blended between based on the values of multiple inputs.

In our case our inputs are SpeedY (Horizontal Axis) and SpeedX (Vertical Axis), meaning forward and right speed, respectively.

tip

Read Retargeting Animations for retargeting animations into nanos world Skeleton.

All you need to do is create a new Blend Space 2D and drag'n drop your animations on it.

Configuration de BlendSpace

First, make sure the Horizontal and Vertical Axis are named SpeedY and SpeedX respectively. Also they need to be clamped to -1.0 and 1.0 Axis Values:

tip

Vous pouvez ajuster le temps de Smoothing comme vous le souhaitez 😉.

Configuration par script

Vous pouvez configurer l'animation de locomotion BlendSpace par script à l'aide de 3 méthodes :

  • Character.SetAnimationIdleWalkRunStanding(anim_path, enable_tip)
  • Character.SetAnimationIdleWalkRunCrouching(anim_path, enable_tip)
  • Character.SetAnimationIdleWalkRunProning(anim_path)

The enable_tip can be toggled to enable/disable Turn In Place built-in feature.

Animations de transitions

Il est également possible de définir l'animation de transition entre les états (debout, couché sur le ventre, accroupi), ce sont de simples animations de séquence pour améliorer le "lerp" entre eux.

Configuration par script

Grâce à la programmation, vous pouvez définir les animations de transition à l'aide de 2 méthodes :

  • Character.SetAnimationsTransitionStandingCrouching(anim_standing_to_crouching, anim_crouching_to_standing)
  • Character.SetAnimationsTransitionCrouchingProning(anim_crouching_to_proning, anim_proning_to_crouching)

In each method you can set the transition between 2 states (Standing <-> Crouching or Proning <-> Crouching).

Notifications d'animation personnalisée

Vous pouvez intégrer vos animations avec les notifications nanos monde d'animation intégrées, pour déclencher des sons de pas ou désactiver le mouvement, par exemple !

Voici la liste des noms possibles pour les notifications d'animation et leurs effets :

Notify NameDescription
Footstep_SoundCela permettra de jouer un son de pas en fonction de la surface sur laquelle se trouve le personnage.
Movement_DisableCela désactivera les mouvements du personnage (utile par exemple pour les animations de transition « Se relever »).
Movement_EnableCela permettra le déplacement du personnage.

Ajouter une notification

Adding Notify is very straight, just Right Click on any Notify Track of your animation and click Add Notify -> New Notify:

Il vous suffit ensuite de saisir l'un des noms de notification d'animation listés ci-dessus :

Vous avez terminé ! Vous pouvez le positionner précisément au moment où les pieds touchent le sol pour un son parfait !