godotengine / godotengine/godot

Bone Attachment 3D cannot contain any collision purpose objects in it

Open
#107,888 6 comments 0 reactions 0 assignees View on GitHub
bug confirmed topic:3d topic:animation
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.4.1.stable.official [49a5bc7b6]

### System information

Windows 10, Jolt Physics, Rendering Driver: Vulkan, Rendering Method: Mobile

### Issue description

Due to some reason all bones in a rig take random scales, instead of being (1, 1, 1) as they should in order to avoid issus like one listed below, they have slightly altered values of scale, such as (0.984, 1.023, 1.104)
And due to this u cannot parent stuff like Area3D as child of BoneAttachment3D because godot will complain on that it being not uniformly scaled and thus push an error into the console every tick, and so it accumulates around few thousands of those what leads to memory leaks and crashes upon trying to clean those.

Down here my description on how i discovered this issue a few days ago:

[video here](https://www.reddit.com/r/godot/comments/1lg8g2n/boneattachment3d_scaling_broken_might_be_a_godot/)

So for unknown reason, the BoneAttachment3D took a random non-uniform scale and refuse to accept anything else, on what godot complains as u can see in the console.

As demonstrated, this isnt a systematic error since only some of the BoneAttachment3d's have this corruption. Parent in which they lay is scaled to (100, 100, 100) and this particular BoneAttachment Scaled to (1,016, 0.968, 1.1016). If i scale HitBoxParent to 1,1,1 issue wont dissapar as now scale of BoneAttachment will be same but multiplied by 100 and issue will remain.
Reason why the boneAttachments were scalen up so humongously is that apperantly its automatic upon bounding to an external skeleton.
Going up the whole hierarachy, non of the parents is scaled non uniformly, but (1, 1, 1)

I tried taking those BoneAttachments which were corrupted and instead of using an external skeleton on them - move them into the skeleton it self and i finaly was able to tweak the scale of those BoneAttachments, But as i started game, animation of skeleton played, and the EXACT same error pouped up, i mean the engine still was percieving the scale as (100.037125, 100.037125, 100.037125)
It is because of the "rig" object's scale is (100, 100, 100) - that is the specifics of Blender to Godot export so the Rig scale was not my decidion.
Blender i exported the models from: some version around 3. Now im using the 4, but at the moment when the Player Model was done it was assumingly the rouhgly last one. Ill try re-exporting the model from the currently last version of blender.
The current Player Model format is FBX.

Another issue is that Godot prints an exorbitant amount of errors, to that degree that it CRASHES or freezes up to a straight minute.

The thing is i tried avoiding this issue by utilizing the RemoteTransform3D, giving its remote path a boneAttachment3D i need and just pick it not to copy scale. But no. It just doesnt work. It stands still like if nothing would happen even through the bone is moving around.

Important to note: Despite of all of this errors which seemingly point to that these collider things should not work, everything works fine, and all of the collider seem not to change enough for like... like i mean maybe they scale a tiny but differntly but thats so insignificant that in game its not noticible and if not errors i wouldnt ever know.
Im using Jolt Physics since its actually much better then the standart one, thats a whole another subject to disscuss.
I hope i included enough information for issu to be solven but if i didnt please tell me which clues should i add, i plan to report this as a bug to Godot Github.

So apperantly im not the only person who struggles wtih such an issue and i believe thats a bug. Heres a [link](https://www.reddit.com/r/godot/comments/1kkwnjl/boneattachment3d_and_hitbox_scaling_issues/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)

I appologise profuselly for inconviniences brought by how poorly i have composed this report, im just really exhausted with this issue but couldnt just keep it for my self since theres litterally only a single mention of it ever created only on reddit which were left with no attention.

### Steps to reproduce

0. using Jolt physics export any armature with more then just a few bones, a humanoid rig for instance.

1. Make a BoneAttachment3D (it doesnt matter if it utilizes externall skeleton or is a child of one)

2. Parent an Area3D to it with a CollisionShape3D into it (shape doesnt matter)

3. Move the bones in any way during run time or in editor, with animation or IK nodes

4. Foremention issue will appear at this moment

### Minimal reproduction project (MRP)

[boneAttachment3dBug.zip](https://github.com/user-attachments/files/20863377/boneAttachment3dBug.zip)

I must as well notice that the same errors arent getting pushed when non Jolt physics is being utilized

Contributor guide

Open the contributing guide

Research direction

Start with the attached boneAttachment3dBug.zip reproduction and the BoneAttachment3D, Area3D, and CollisionShape3D setup described in the steps. Run it with Jolt Physics, move or animate the bones, and compare the repeated scale errors and crashes with the non-Jolt configuration. Done means the reproduction no longer emits the accumulating errors while the colliders continue following the bones.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.