Skip to content

feat: spring bones#247

Open
daniele-dcl wants to merge 1 commit intomainfrom
feat/spring-bones
Open

feat: spring bones#247
daniele-dcl wants to merge 1 commit intomainfrom
feat/spring-bones

Conversation

@daniele-dcl
Copy link
Copy Markdown

@daniele-dcl daniele-dcl commented Mar 20, 2026

Summary

Adds support for the DCL_spring_bone_joint GLTF extension during asset bundle conversion, enabling spring bone physics on converted wearables and emotes.

What this does

  • Integrates spring bone processing into the GLTF import pipeline: During the PreProcessGameObjects phase of the custom GLTF importer, spring bone joint data is now extracted from the GLTF source and applied as SpringBoneJointComponent components on the corresponding GameObjects.
  • Bumps the unity-gltf submodule to include:
    • Parsing of the DCL_spring_bone_joint GLTF extension (stiffness, drag, gravity direction/power, hit radius, root flag)
    • Serializable spring bone component properties for runtime use
    • A reusable SpringBoneUtils utility that resolves spring bone data from the GLTF node tree and maps it onto the Unity scene hierarchy by node name

How it works

  1. The GLTF file is parsed by unity-gltf, which now recognizes the DCL_spring_bone_joint extension on nodes.
  2. After the scene hierarchy is instantiated, CustomGltfImporter.PreProcessGameObjects calls SpringBoneUtils.ApplySpringBoneJoints, passing the parsed GLTF data and the root GameObject.
  3. The utility iterates over all GLTF nodes, finds those with spring bone extension data, matches them to scene transforms by name, and attaches a SpringBoneJointComponent with the configured physics parameters.

@daniele-dcl daniele-dcl self-assigned this Mar 20, 2026
@daniele-dcl daniele-dcl requested a review from dalkia March 20, 2026 15:32
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

Successfully merging this pull request may close these issues.

1 participant