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

2D Animation Not Playing in 4.2 but in 4.1.1 #83130

Closed
Filgaja opened this issue Oct 10, 2023 · 1 comment
Closed

2D Animation Not Playing in 4.2 but in 4.1.1 #83130

Filgaja opened this issue Oct 10, 2023 · 1 comment

Comments

@Filgaja
Copy link

Filgaja commented Oct 10, 2023

Godot version

v4.2.dev6.mono.official [57a6813]

System information

Godot v4.2.dev6.mono - Windows 10.0.19044 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.3713) - AMD Ryzen 9 3900X 12-Core Processor (24 Threads)

Issue description

Hello there,

The Animation of the player is not played via code.
I am playing the Animation in _Process with Play() and it worked in 4.1.1 but not in 4.2
Its reproducible. I did it with a minimalProject and only a few lines of Code.
I Will Attach it to this report

Here is a Video to Show this problem: https://www.youtube.com/watch?v=DehdC076028
First I start the project inside Godot 4.2, then inside 4.1.1 and there it works.

Steps to reproduce

  • Create a new Project - Forward+
  • Create a SceneNode2D
  • Create a characterBody2D
  • Create Childs in characterBody2D:
    -- CollissionShape2D with Capsule shape
    -- Sprite2D with an simple 4 HFrames and 1 VFrame (walk down animation)
    -- AnimationPlayer
  • In Sprite2D use Spritesheet
    -- Hframes 4
    -- Vframes 1
  • In Animation Window create a simple animation wiht Hframe 2 1 3 1
  • Name the Animation "Move_Down"
  • Create a script on the characterBody2D (I Simply rightclicked and used Add Script)
using Godot;

public partial class CharacterBody2D : Godot.CharacterBody2D
{
    
    private AnimationPlayer _animPlayer;
    public override void _Ready()
    {
        _animPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
    }
    
    public override void _Process(double delta)
    {
        _animPlayer.Play("Move_Down");
    }
}

From now on you can add a camera and zoom for better view and start the project.
The character isnt animating. only the first Hframe 2 of 2 1 3 1 ist shown and then stuck - no error in the console

When I now save the project and start with 4.1.1 without changing anything and start the project, the animation is playing.

Thank you!

Minimal reproduction project

MinimalProject.zip

I am Sorry: I only able to write C# but I think this issue is not code related since it works fine in 4.1.1

@Filgaja Filgaja changed the title 2D Animation Not Play in 4.2 but in 4.1.1 2D Animation Not Playing in 4.2 but in 4.1.1 Oct 10, 2023
@bitsawer
Copy link
Member

Thanks for the report. Looks like a duplicate of #82828 which has been fixed by #82898 in the master. The fix should be in the next 4.2 dev/beta release. Closing as duplicate.

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

2 participants