Skip to content
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

AnimationPlayer Call Method Track Doesn't Call Methods if Another Track is Present. Editor Crashes if Added After Another Track. #94644

Closed
cprosser-3 opened this issue Jul 23, 2024 · 3 comments

Comments

@cprosser-3
Copy link

Tested versions

Version: 4.2.2 Stable

System information

Windows 10 - Godot 4.2.2 Stable - Forward+

Issue description

When using the AnimationPlayer Node and Call Method Track, methods stop being called if another Animation Track is present for the same Node. If the Call Method Track is added after another Track the entire Godot editor crashes.

Steps to reproduce

Steps:

Create MeshInstance3D as floor.
Alter size of mesh to 20x20.
Create Trimesh Static Body for floor collision.

Create CharacterBody3D for player.
Assign CollisionShape3D node with new CapsuleShape3D for player collision.
Assign Camera3D for player view.

Create CharacterBody3D for character (named CharacterBody3D2).
Assign MeshInstance3D for CharacterBody3D2 mesh.
Create Single Convex Collision Sibling for CharacterBody3D2 collision.
Create and assign script for character as follows

using Godot;


public partial class CharacterBody3D2 : CharacterBody3D
{
    public override void _Ready()
    {
        GetNode<AnimationPlayer>("AnimationPlayer").Play("Test");
    }


    public void F1()
    {
        GD.Print("1");
    }


    public void F2()
    {
        GD.Print("2");
    }
}

Assign AnimationPlayer to CharacterBody3D2.
Create new Animation named "Test" and make it "Looping".
Create Call Method Track for CharacterBody3D2 with F1() and F2() at any interval as key frames.
Test in Debug. "1" and "2" will be printed as expected.

Create a new track for CharacterBody3D2, such as Position Track, and move CharacterBody3D2 at any interval as key frames.
Test in Debug. the mesh will move as expected BUT "1" and "2" will no longer print.

Delete original Call Method Track.
Create a new Call Method Track.
Godot Editor will now crash.

Minimal reproduction project (MRP)

Project_Temp.zip

@TokageItLab
Copy link
Member

TokageItLab commented Jul 23, 2024

Fixed by #86687 in 4.3, cannot backport since it is major refactoring.

@TokageItLab TokageItLab closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2024
@cprosser-3
Copy link
Author

I am noticing issues with 4.3 as well, it no longer crashes, but the Method Call still doesn't work and closing and re-opening the project removes the Method Call track altogether. Since 4.3 is still Beta is creating a New Issue the right thing to do or just check back when 4.3 is officially released?

@TokageItLab
Copy link
Member

TokageItLab commented Jul 24, 2024

Probably that is a different problem than this issue. Looking at your MRP, it seems to use C# so it may be a C# specific problem. Please do a comparison between gdscript and C#.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants