Closed Noah2610 closed 4 years ago
Add LedgeDetector
component, that generates events.
Should be able to configure which corners to detect ledges for,
and when to trigger depending on which side the entity is standing on.
Generates events which include which corner was detected.
Delelte corner detector entities when entity is deleted or entity switches variant.
Working.
Entity config example:
See the ledge detector component in the example for some doc comments.
See the variant's OnLedgeDetect
events for usage example.
Basically, when you add the LedgeDetector
component to an entity,
it will produce ledge detector events, which can be listened to with the OnLedgeDetect
event.
Ledge detecting on its own does nothing, except generate those events.
@hoichael Merged in master.
Add logic for making enemies turn around when they hit a floor ledge.