#Sync animation speed to walk speed

1 messages · Page 1 of 1 (latest)

native thorn
#

Is there a way to make an animation speed base on the entity's walk speed? so like if the entity is slow the animation slows down.

round tinsel
#

Yes, check out vanilla entities for examples. They define a variable called variable.tcos0 which changes depending on movement speed, and that variable is used in animations

#

From vanilla_rp/entity/skeleton.v1.0.entity.json:

      "scripts": {
        "pre_animation": [
          "variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"
        ]
      },```
rare garnet