godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.99k stars 20.18k forks source link

Skeleton2D and Bone2D throwing error "core/math/transform_2d.cpp:51 - Condition "det == 0" is true." #83558

Open FizzyQuizzler opened 11 months ago

FizzyQuizzler commented 11 months ago

Godot version

4.1.2 Stable

System information

macOS 14.0 Sonoma, Intel Core I9, AMD 550M, Forward+

Issue description

I am having a problem with Skeliton2d and bone 2D where while I am trying to rig a 2D character in the latest version of Godot, I keep getting some errors and it wont let me set a rest position. I am not sure if I am doing this right, so I followed a few tutorial videos on youtube, but with no luck. I keep getting the error " core/math/transform_2d.cpp:51 - Condition "det == 0" is true." anyone know how to fix this? Screenshot 2023-10-18 at 10 21 57 AM Screenshot 2023-10-18 at 10 23 20 AM

Steps to reproduce

While attaching Skeliton2D and Bone2D to the Scene, I started getting the above errors, starting with one for each bone that was added. then finally when all of the bones were in place, I selected to set the rest position and the errors were firing off constantly.

Minimal reproduction project

Project.zip

Sammyueru commented 10 months ago

I've been getting the same error with 3D

martinfelis commented 10 months ago

The scale of pretty much all bone transforms is set to zero, which gets clamped to really small values (0.00001). When Godot computes the transforms of all bones are multiplied with each other eventually resulting in zeros. This causes the rotation matrices to be invalid and therefore the determinant becomes zero.

FranAyrolo commented 7 months ago

I have the same problem. Going through the Skeleton2D tutorial in the docs. Mine says:

ERROR: Condition "det == 0" is true.
   at: affine_invert (core/math/transform_2d.cpp:51)

several times My system information:

Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
OpenGL API 4.6 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1 - Compatibility - Using Device: AMD - AMD Radeon RX 6700 XT (navi22, LLVM 15.0.7, DRM 3.42, 5.15.0-91-generic)

Editing project: /home/francisco/Documents/godot/projects/bones_testing
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
Vulkan API 1.3.238 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon RX 6700 XT (RADV NAVI22)
CsloudX commented 2 weeks ago

I have the same problem, Godot4.3. and i'm not sure it is cause by IK. image It not report error in Player.tscn, But it report error in Level.tscn (Level.tscn have a Player.tscn instance). and i'm not modify any thing int Level.tscn for Player node

axisnova commented 1 week ago

https://imgur.com/vR9yuul

I also got this error but I found what was doing it. I was animating a 3d node being used as a camera controller. I had accidentally set the scale to 0 or -0 or something I was trying to put in -0.024 in rotation x. It didnt show up until I tried playing a scene. Worked backwards undoing everything I did but when I reset scale it went away. Hope that helps anyone.

AThousandShips commented 1 week ago

Unrelated, this is for 2D not 3D, please open a separate issue (after searching for existing ones, open and closed)