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

collision_query: Fixed incorrect triangles position #224

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PiMoNFeeD
Copy link
Contributor

For scaling physics props, Source gets all the vertices from collision model, scales their position (as it's relative to object, it's a matter of just position *= scale) and constructs a brand new collide out of that. However, Jolt (or Volt) appears to move model's origin to the center, and then offset it back to original pose by applying custom center of mass, which results in those rebuilt vertices having incorrect position (scaled from the center of the mesh, rather than it's origin). Applying center of mesh position manually to each vertex fixes the issue.

@PiMoNFeeD
Copy link
Contributor Author

comparison screenshots:

before

image

after

image

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