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

Bug in btGImpactQuantizedBvh::refit function with scaling the mesh #4588

Open
kochol opened this issue Mar 7, 2024 · 0 comments
Open

Bug in btGImpactQuantizedBvh::refit function with scaling the mesh #4588

kochol opened this issue Mar 7, 2024 · 0 comments

Comments

@kochol
Copy link

kochol commented Mar 7, 2024

I have a program that uses btGImpactMeshShape to create a mesh shape and when I scale it the collision detection won't work anymore.

But when I remove the below if and call the m_box_set.buildSet() function everything works as expected.

if (m_box_set.getNodeCount() == 0)
{
m_box_set.buildSet();
}

I think the bug is in the below function.

SIMD_FORCE_INLINE void getNodeBound(int nodeindex, btAABB& bound) const
{
bound.m_min = bt_unquantize(
m_node_array[nodeindex].m_quantizedAabbMin,
m_global_bound.m_min, m_bvhQuantization);
bound.m_max = bt_unquantize(
m_node_array[nodeindex].m_quantizedAabbMax,
m_global_bound.m_min, m_bvhQuantization);
}

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

No branches or pull requests

1 participant