reckfellENGINE

Side contact and ending the round

Area3D checks overlap on the floor, including landing beside a hazard already detected in the air.

On this page

Hit area

The player's MobDetector uses mask 4, Monitoring and the shape from prefab setup. It detects hazard bodies on layer 3. The capsule handles movement; the area defines the gameplay region for a side hit.

After successful-stomp handling, the complete controller applies this rule: if the player is on the floor, overlapping a live SquashMob calls TakeHit().

Why poll overlaps

BodyEntered alone is insufficient for this rule. A player can enter while airborne, when it is not defeat, then land beside the hazard while remaining inside the area. Another enter event need not occur. The controller therefore reads GetOverlappingBodies() during physics updates and checks current state.

Area lists update on the physics step, not immediately after assigning Position. A newly created or moved object cannot be assumed to have an immediately updated list. This example allows detection on a subsequent physics update.

One defeat

TakeHit() disables Active and clears velocity before emitting Hit. Further overlaps cannot emit it again. EndRun() stops timer and hazards while HUD shows the restart button.

Objects with IsQueuedForDeletion() are ignored. After StartRun(), old hazards can remain in cached overlap lists until actual deletion.

Expected cases

SituationResult
Falling onto a cube with the qualifying normalPoint and bounce
Close side contact on the floorRound ends
Side overlap in the airNo defeat yet
Landing beside the same overlapping hazardDefeat after physics updates
Overlap with an old queued cubeIgnored

For missing hits, check area mask 4, the hazard's numeric layer 4, both shapes and Monitoring. Do not change monitoring or a physics shape directly inside an overlap callback; those changes may require deferral.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.