You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
Had precision issues with bullet collision detection, so I compiled with BT_USE_DOUBLE_PRECISION defined. That improved the kinematic collision issues, but made raycasts sometimes go through the front surface of convex collision. I also created an issue on the bullet github in case it's an issue with the library: bulletphysics/bullet3#2949
Here the raycast is coming from the right and goes through the convex collision. Green line points to collision location. Cyan line is the normal.
With double precision disabled:
Steps to reproduce:
Define BT_USE_DOUBLE_PRECISION in scons, compile, and try raycasting against a convex shape (can be as simple as a box, but not an actual "box shape" shape) from different angles. Some will go through. env_base.Append(CPPDEFINES=["BT_USE_DOUBLE_PRECISION"]) in SConstruct file.
It SEEMS like adding btResult.m_flags |= btTriangleRaycastCallback::kF_UseGjkConvexCastRaytest; to BulletPhysicsDirectSpaceState::intersect_ray() may fix the issue. Haven't tested how that behaves with double precision off, though. I think we want to have double precision enabled unless there's some sort of performance issues with it. It has significantly improved the kinematic collision accuracy.
pouleyKetchoupp
changed the title
Raycasts sometimes go through convex shapes and hit the far side when BT_USE_DOUBLE_PRECISION is enabled.
[Bullet] Raycasts sometimes go through convex shapes and hit the far side when BT_USE_DOUBLE_PRECISION is enabled.
Jan 15, 2021
Godot version: 3.2.2.rc.custom_build.d69b856a4
OS/device including version: Windows 8.1
Issue description:
Had precision issues with bullet collision detection, so I compiled with BT_USE_DOUBLE_PRECISION defined. That improved the kinematic collision issues, but made raycasts sometimes go through the front surface of convex collision. I also created an issue on the bullet github in case it's an issue with the library: bulletphysics/bullet3#2949
Here the raycast is coming from the right and goes through the convex collision. Green line points to collision location. Cyan line is the normal.
With double precision disabled:
Steps to reproduce:
Define BT_USE_DOUBLE_PRECISION in scons, compile, and try raycasting against a convex shape (can be as simple as a box, but not an actual "box shape" shape) from different angles. Some will go through.
env_base.Append(CPPDEFINES=["BT_USE_DOUBLE_PRECISION"])
in SConstruct file.Minimal reproduction project:
Test Double Precision Raycast.zip
Here's a build of the engine with double precision enabled:
godot.windows.opt.tools.32_double_precision_bullet.zip
The text was updated successfully, but these errors were encountered: