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

Using .reparent() on a BoneAttachment3D during runtime breaks it. #91864

Open
lionn00b opened this issue May 12, 2024 · 2 comments
Open

Using .reparent() on a BoneAttachment3D during runtime breaks it. #91864

lionn00b opened this issue May 12, 2024 · 2 comments

Comments

@lionn00b
Copy link

Tested versions

  • Reproducible in 4.3.dev6, 4.2.2.stable

System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.5244) - Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 Threads)

Issue description

In my game, I have a BoneAttachment3D node which controls where the arms of the character are positioned. Before reparenting, the arms are influenced by outside animations. When I equip a weapon I would like the arms to follow the weapon's animations too, so I reparent the BoneAttachment to that weapon, however that stops all influences on the arm bones from happening. Manually moving the BoneAttachment into the weapon in the editor before playing has it work fine, so it seems to be an issue with the reparent() functionality. Additionally, reassigning the BoneAttachments' external skeleton during runtime in the Remote tab does not fix it.

image

What it looks like:

2024-05-12.14-41-04.-.Trim.mp4

Steps to reproduce

Create a BoneAttachmen3D node.
Enable External Skeleton and Override Pose.
In a script, call boneAttachment.reparent(parent)
In game, the BoneAttachment will stop having any effects

Minimal reproduction project (MRP)

N/A

@cryoboltinteractive
Copy link

Your debugger also shoots up with something every frame after the reparent() method is called. can you provide more details on what that error is?

@lionn00b
Copy link
Author

lionn00b commented May 12, 2024

Your debugger also shoots up with something every frame after the reparent() method is called. can you provide more details on what that error is?

Ah thanks, I'm fairly sure that was an unrelated error with my player code. image

Not sure why they appeared as soon as i equipped the weapon in the video, that doesnt usually happen. Even when they dont pop up the boneattachment stops working anyway.

Will keep an eye to see if it happens again in the future though.

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

No branches or pull requests

2 participants