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

Fix collision initialization for container assets. #5799

Merged

Conversation

jpauloruschel
Copy link
Contributor

Fixes #3638 and #3974.

This PR implements an additional check when using Assets that have a Container Asset on Collision components. The new code will check if the asset's containerAsset is also loaded, and if not, load it. As noted in the linked Issues, this is required so that the meshInstances are actually loaded on the asset.

For use-cases where the Asset does not have a containerAsset or if it's already loaded, there's no change.

Sample Project with bug: https://playcanvas.com/editor/scene/1894310

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@mvaligursky mvaligursky merged commit 4e7df31 into playcanvas:main Nov 8, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: physics Physics related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render asset as a collision mesh when container is not loaded
3 participants