Bookshelf
Bookshelf copied to clipboard
Add a way to define custom hitboxes
Feature Name
move:apply_*, raycast:run
Target Module
move, raycast
Feature Description
This could be done by having an optional parameter with coordinates mapped to a voxel shape
EDIT:
These custom hitboxes will be defined using entities, through three new hitbox functions:
-
bs.hitbox:set_entity { with: { width: <float>, height: <float>, depth: <float>, centered: <bool> } }depthcontrols the Z-axis. If not specified, it defaults to the same value aswidth.centereddetermines whether the hitbox is centered on the Y-axis (useful for entities like paintings or item frames).
-
bs.hitbox:reset_entity- Resets any custom hitbox data. The entity’s default hitbox remains accessible.
-
bs.hitbox:bake_entity- Sets the current hitbox as the entity’s custom hitbox and freezes it.
- Future scale changes or entity growth (e.g., a baby maturing) will not affect the hitbox.
- The function also computes a hitbox that encompasses the entire entity stack, including any passengers.
Additional Context
No response