Skip to content

Commit

Permalink
gameplay: in case a point and a zone uses the same position we need t…
Browse files Browse the repository at this point in the history
…o have a small threshold for objects to be inside the zone
  • Loading branch information
xesf committed Aug 5, 2023
1 parent 876554c commit d723d0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/loop/zones.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function processZones(game: Game, scene: Scene, time: Time) {

const box = zone.props.box;
if (pos.x >= box.xMin && pos.x < box.xMax &&
pos.y >= box.yMin && pos.y <= box.yMax &&
pos.y >= box.yMin - 0.1 && pos.y <= box.yMax + 0.1 &&
pos.z >= box.zMin && pos.z < box.zMax) {
const zoneType = ZoneOpcode[zone.props.type];
if (zoneType !== null && zoneType.handler !== null) {
Expand Down

0 comments on commit d723d0b

Please sign in to comment.