So I'm trying to implement Octree from fps example, and i have an issue that collision is detecting but there is ~1 additional unit spacing around the capsule (screenshot)
how to remove it?
I have basically copy-paste the collision checking logic
const result = collider.capsuleIntersect( player );
playerIsOnGround = false;
if ( result ) {
playerIsOnGround = result.normal.y > 0;
console.log(result);
if ( ! playerIsOnGround ) {
playerVelocity.addScaledVector( result.normal, - result.normal.dot( playerVelocity ) );
}
player.translate( result.normal.multiplyScalar( result.depth ) );
}