Skip to content

Apply maxInteractDistance to nearby entity scans (#36)#39

Open
YgorLeal wants to merge 1 commit intoSleepless-Development:mainfrom
YgorLeal:fix/nearby-entities-distance
Open

Apply maxInteractDistance to nearby entity scans (#36)#39
YgorLeal wants to merge 1 commit intoSleepless-Development:mainfrom
YgorLeal:fix/nearby-entities-distance

Conversation

@YgorLeal
Copy link
Copy Markdown

@YgorLeal YgorLeal commented Apr 11, 2026

Summary

  • Replaces the hardcoded 10.0 radius in getNearbyObjects/Vehicles/Players/Peds with config.maxInteractDistance, so the existing distance config actually applies to entity scanning.
  • Adds optional per-pool overrides (nearbyObjectsDistance, nearbyVehiclesDistance, nearbyPlayersDistance, nearbyPedsDistance) for users who want to decouple scan radius from the render distance, as suggested in the issue.

Closes #36.

Test plan

  • Default config: interactions on objects/vehicles/players/peds resolve within maxInteractDistance.
  • Lower maxInteractDistance (e.g. 3.0): entities beyond that range no longer enter the nearby pool.
  • Set config.nearbyObjectsDistance = 15.0 while keeping maxInteractDistance = 5.0: object interactions scan at 15m, render still gated by 5m.

Closes Sleepless-Development#36. Replaces hardcoded 10.0 radius in getNearbyObjects/Vehicles/
Players/Peds with config.maxInteractDistance, and adds optional per-pool
overrides (nearbyObjectsDistance, nearbyVehiclesDistance,
nearbyPlayersDistance, nearbyPedsDistance) for decoupling scan radius
from render distance.
@YgorLeal YgorLeal force-pushed the fix/nearby-entities-distance branch from a18c663 to 83c3ca0 Compare April 11, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MaxDistance config option doesn't apply to checkNearbyEntities()

1 participant