-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnimationTree doesn't work right anymore godot 4 beta 14,15 #72122
Comments
It's not a bug. The parameter control has changed a lot, but unfortunately the documentation has not been updated, sorry. See also #71418. |
Thank you, for your comment. Works perfect! |
@TokageItLab You can test the attached sample project. |
@metanoia83 The request should not be spammed. So it should be: if _animation_tree.get("parameters/move_state/current_state") != "jump":
_animation_tree.set("parameters/move_state/transition_request", "jump") |
Below is the output for the code above. test.mp4 |
func handle(is_on_floor: bool, _motion: Vector2) -> void:
if not is_on_floor:
if _animation_tree.get("parameters/move_state/current_state") != "jump":
_animation_tree.set("parameters/move_state/transition_request", "jump")
else:
if _animation_tree.get("parameters/move_state/current_state") != "move":
_animation_tree.set("parameters/move_state/transition_request", "move")
# Blend position for walk speed based on motion.
_animation_tree.set("parameters/move/blend_position", _motion.length()) cap.mp4 |
@TokageItLab Thanks for the help. |
Godot version
4.0 beta 14,15
System information
Ubuntu 22.04 1 LTS
Issue description
After update from godot4 beta 13 to beta 14 AnimationTree doesn't work right anymore.
_animation_tree.set["parameters/move_state/current"] = 1 #<= NOT WORKING
ERROR: Invalid set index 'parameters/move_state/current' (on base: 'Callable') with value of type 'int'
Change code to:
_animation_tree.set("parameters/move_state/current", 1) #<= IT WORKS BUT NOT RIGHT
Control of AnimationTree is corrupt. See appended project.
Steps to reproduce
Please download and start "Minimal reproduction project"
Minimal reproduction project
game_character_test.zip
The text was updated successfully, but these errors were encountered: