Skip to content

Jolt: fix Compound shapes not initializing their _shape#49

Open
twhlynch wants to merge 1 commit intouberpixel:developfrom
twhlynch:fix/jolt-compound-shapes
Open

Jolt: fix Compound shapes not initializing their _shape#49
twhlynch wants to merge 1 commit intouberpixel:developfrom
twhlynch:fix/jolt-compound-shapes

Conversation

@twhlynch
Copy link
Contributor

Need to look into this further to be sure, but pretty sure JoltCompoundShape would simply not initialize a _shape.
Maybe just adding the super constructor would also fix it.

@twhlynch
Copy link
Contributor Author

on further investigation, this is the correct fix

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Jolt compound shapes so they always initialize their underlying Jolt shape instance (_shape) before children are added.

Changes:

  • Initialize _shape in JoltCompoundShape() by constructing a JPH::MutableCompoundShape and AddRef()-ing it.
  • Initialize _shape similarly in JoltCompoundShape(const Array *meshes, ...) before enumerating meshes / adding children.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants