Skip to content

collision_query: Fixed incorrect triangles position#224

Open
PiMoNFeeD wants to merge 1 commit into
misyltoad:mainfrom
PiMoNFeeD:prop-scaling
Open

collision_query: Fixed incorrect triangles position#224
PiMoNFeeD wants to merge 1 commit into
misyltoad:mainfrom
PiMoNFeeD:prop-scaling

Conversation

@PiMoNFeeD
Copy link
Copy Markdown
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
Copy Markdown
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