+1 vote

Hello, thank you for checking this question.

The project is set up in the next way:
I'm working on a 2.5D character controller and i have stumbled uppon one issue. To animate my character i am using AnimationNodeBlendTree. My goal is to make my character play looping bounce animation when he is moving and stop it otherwise. The problem is that when stopping bounce animation amidst it playtime the character ends up in the wrong position(ex. above ground). I would like to allow this bounce animation to finish its current loop and only then stop it.

I already came up with a solution but it certainly leaves more to desire.
Here is a screenshot of a current sollution using AnimationNodeBlendTree :
enter image description here
To control when to play bounce animation i can modify "blend" property of Add2(addbounceall). When it's set to one it plays looping bounceenvoker animation which animates the "on" property of OneShot(shotbounce). And even when "blend" property is set to zero it doesn't interrupt the current iteration ofa bounce animation.

Like i said the utilised solutions is not the most optimal in my opinion, as it requires animation which changes AnimationNodeBlendTree properties thus cluttering character animation list.
Here is a minimal project with this solution: google drive link

This would be great if you could provide other ways to accomplish this!

Godot version v3.3.2
in Engine by (26 points)

1 Answer

+1 vote
Best answer

Answering this live on stream: https://www.youtube.com/watch?v=fC3384meGZA

Should be at the 1 hour mark.

by (577 points)
selected by

Cool! Will definitely check it out

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.