LinearCast Body missed in Sensor contact

Author: QendolinCreated Jun 13, 2024Updated Jun 23, 2025

Hello, I've noticed an issue where rigid bodies using JPH::EMotionQuality::LinearCast do not report contacts with sensors when moving at high speed (~100 m/s).

Here is my character body creation code:

cpp
JPH::Ref<JPH::CharacterSettings> character_settings = new JPH::CharacterSettings();
character_settings->mMaxSlopeAngle = JPH::DegreesToRadians(45.0f);
character_settings->mLayer = ph::Layers::PLAYER;
character_settings->mShape = new JPH::SphereShape(0.25f);
character_settings->mFriction = 0.0f;
character_settings->mGravityFactor = 0.0f;
body_ = new JPH::Character(character_settings, JPH::RVec3(0.0, 0.0, 0.0), JPH::Quat::sIdentity(), 0, physics().system);
physics().interface().SetMotionQuality(body_->GetBodyID(), JPH::EMotionQuality::LinearCast);
body_->AddToPhysicsSystem(JPH::EActivation::Activate);

My sensor is a static body, roughly 0.2m thick. The character body is moved using body_->SetLinearVelocity before the physics update.

Using Jolt 4.0.2, and a 60Hz update interval with 1 collision step and the single threaded job system.