mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: also take trigger areas into consideration for traversal ray tracing
Currently, trigger only gets used for hazard or door area's, and we don't want NPC's to traverse through these. The collision detection system needs a small overhaul to take actual polygon flags or contents into account which will allow for a much more detailed filtering. This will be done once we use more areas than just hazard or door.
This commit is contained in:
parent
3d91bc3143
commit
81c0cab610
@ -584,7 +584,13 @@ static bool polyEdgeFaceAgainst(const float* v1, const float* v2, const float* n
|
||||
// NOTE: we don't want to collide with trigger area's as this would otherwise
|
||||
// prevent a link from happening between 2 valid slabs that intersect with
|
||||
// something like a door or action trigger.
|
||||
static const int TRAVERSE_LINK_TRACE_MASK = TRACE_WORLD|TRACE_CLIP;
|
||||
//
|
||||
// UPDATE: currently we only use door area's to mark polygons under doors, and
|
||||
// we don't want traverse links to establish between doors. The trigger mask
|
||||
// has therefore been added. The mask system needs to be reworked to take trigger
|
||||
// area flags into account and use those too, ideally with the content masks
|
||||
// provided by the engine itself.
|
||||
static const int TRAVERSE_LINK_TRACE_MASK = TRACE_WORLD|TRACE_CLIP|TRACE_TRIGGER;
|
||||
|
||||
static bool traverseLinkOffsetIntersectsGeom(const InputGeom* geom, const float* basePos, const float* offsetPos)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user