Bookshelf
Bookshelf copied to clipboard
Raycast doesn't always stop at the nearest contact point when using both blocks and entities
π’ Version
v3.0.2
π Related Feature
#bs.raycast:run
β Expected Behavior
The raycast should stop at the nearest contact point, regardless of whether itβs a block or an entity.
β Actual Behavior
In certain edge cases, when an entityβs hitbox is inside a block and the block's collision shape is smaller (i.e., would be contacted later based on distance), the raycast prioritizes the block over the entity, even if the entity is technically closer.
π Steps to Reproduce
No response
π‘ Possible Fix
A potential fix could be to gather all potential collision distances, both from blocks and entities, and then process only the nearest one (or sort them if piercing is enabled).