-
-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add a hitboxFilter argument to raycast() (#2968)
Adds a new argument callback to all `raycast*` methods that lets the user ignore hitboxes dynamically. The callback is called with every prospective hitbox, and the hitbox is only considered when the callback returns `true`. This is faster, in the general case, than the current `ignoreHitboxes` aproach. And it lets the developer have dynamic rules about what the rays collide with. (For example, a line-of-fire raycast should take friendlies into account, but could easily ignore other enemies that get in the way.) Closes #2966
- Loading branch information
Showing
3 changed files
with
72 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters