Skip to content

Fit a collider shape to a node's mesh in the editor #320

Description

@bdero

The inspector can attach a collider and edit a primitive shape's numbers, but nothing derives a shape from the selected node's geometry. A convex hull or triangle mesh is not editable by hand, so the editor cannot produce one at all.

Add a fit-to-mesh action on the collider component that computes a shape from the node's subtree and writes it into the component. Box, sphere, and capsule fit the subtree bounds. Convex hull and triangle mesh come from Node.extractMeshData, which bakes the descendant transforms into the frame the collider needs. ColliderCodec already serializes all of them, bulk trimesh payload included, so the result persists with no format work.

Expose it as an editor command as well as an inspector action, so it is scriptable over MCP.

Convex decomposition (#187) becomes another entry in the same menu once it lands.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmapPlanned long-horizon work owned by maintainers.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions