• Runtimes
  • Spine animations not working consistently

So i have a spine anim projected onto a 3d mesh and a subviewport, and the spinenode as the child of the sub viewport.
![
](https://)

I have a button that when pressed calls a function to start animations.

These animations only sometimes work, 90% percent fail rate.


func _on_button_pressed():
	for girl in bad_girls:
		girl.get_node("Mesh").get_node("SubViewport").get_node("SpineSprite").bend_down()
		girl.panty = true
		$CanvasLayer/Control/begin_timer.start()
		$CanvasLayer/Statbar.show()
		$CanvasLayer/player_statsbar.show()

`
`extends SpineSprite




func _ready():
	get_skeleton().set_skin(get_skeleton().get_data().find_skin("blonde_hair"))
	get_animation_state().set_animation("idle_standing", true, 0)

here is the func being called 
func bend_down():
	get_animation_state().set_animation("skirt_lift", false, 0)
	get_animation_state().add_animation("bend_down", 0.0, false, 0)
	get_animation_state().add_animation("idle_bent", 0.0, true, 0)
	print("Spine state:", get_animation_state())
	print("Current animation:", get_animation_state().get_current(0).get_animation().get_name())

here is video of the failure, i cant show the successful attempts cuz the game is porn.

  • Misaki ответили на это сообщение.
    Related Discussions
    ...

    The issue you're experiencing with inconsistent animation playback could be related to how the animations are being queued and played. In the provided code, you are setting multiple animations in sequence using set_animation and add_animation. It's important to ensure that the animations are not being overridden or interrupted by other processes. One potential problem could be that the set_animation call is not completing before the add_animation calls are made, leading to unexpected behavior. You might want to check if the animations are being set correctly and if there are any conditions or states that might be causing the animations to fail. Additionally, ensure that the Spine runtime and the environment you are using are compatible and up-to-date.

    • jubalnorth ответили на это сообщение.

      Spinebot i removed all but the first set_animation same problem

      If you are setting the animation repeatedly every game frame, it could be reset to the first frame and appear not to move. Since you are logging when you set the animation, it doesn't seem to be the case, but it's common so I mention it.

      It may be that the AnimationState time is not being advanced. You can check by logging this over multiple game frames:

      get_animation_state().get_current(0).get_track_time()

      If it doesn't advance then either the AnimationState is not being updated with the delta time between frames, the AnimationState time scale is 0, or the TrackEntry time scale is 0.

      If you still have trouble, my colleagues will be here Monday to help you out further!

      jubalnorth Based on the script you showed us, there doesn't seem to be any problems, so it would be best if you could send us the minimum Godot project required to reproduce the problem via email:
      contact@esotericsoftware.com
      Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.