![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | DaviBraid |
I have two animations of 13 frames
One is canned Basic - Run and the other is called Basic- RunAtk
When I press a button to attack, I want the animation tree to go from Basic - Run to Basic - RunAtk but I want the transition to be seemless.
For instance, if the previous animation was in frame 7, I’d like the nest one to start at frame 8. Is there anything I can do to make it happen?
if move_dir != 0 and grounded:
animation_state.travel("Basic - Run")
if move_dir == 0 and grounded:
animation_state.travel("Basic - Idle")
if timedash < 0 and grounded and move_dir != 0:
animation_state.travel("Basic - Dash")
if not grounded and y_velocity < 0:
animation_state.travel("Basic Jump - Transition")
if not grounded and y_velocity >= 0:
animation_state.travel("Basic Jump - Fall Loop")
if wall_slide:
animation_state.travel("Basic - Wall Slide Loop")
if wall_slide and y_velocity < 0:
animation_state.travel("Basic - Wall Jump")
if (left_ray.is_colliding() or right_ray.is_colliding()) and Input.is_action_just_pressed("Jump"):
animation_state.travel("Basic - Wall Jump")