thedivergentai/game-design-agentic-skills

bevy-spatial-queries

Bevy ECS skill for spatial queries.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/thedivergentai/game-design-agentic-skills --skill bevy-spatial-queries

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Bevy spatial queries

When to use

Load this when a design needs line of sight, a volume overlap, a ground probe, or a mouse pick. Screen-to-2D-world mapping that does not hit a collider is a camera helper, not a physics query.

ECS shape

  • Components would own query origin, direction, and a mask once a solver defines them. Check the solver docs before naming those types.
  • Resources would own a physics world. None was opened.
  • Systems would run the query after the solver step. Order that with .chain() on the ECS page. The clock is Fixed / FixedMain from bevy::time, which is not a query API.
  • Camera-only pick: Camera::viewport_to_world_2d with GlobalTransform maps a viewport position to a 2D world position. That is not an intersection test. See bevy-camera-systems.

Coming from Godot

Godot ideaBevy idiom
Ray or shape castCheck bevy-physics-2d or bevy-physics-3d before naming a cast API.
Mouse position in 2D worldviewport_to_world_2d on a Camera (bevy-camera-systems). A collider hit belongs with the physics skills once you choose a solver.
Exclude the casterUnverified. Do not copy Godot RID exclude lists
Field-of-view fanDesign data on components. Check the docs for a sensor API before writing one.

Scope

  • The bevy 0.20.0 feature list has no physics-engine feature, so there is no ray, shape, point, or sweep query to cite.
  • Third-party plugins may be added with add_plugins. Check a physics crate's own docs before naming a query API.
  • Piercing casts, reflection from normals, and ground volumes are unverified.

Expert Knowledge Delta

Target: Bevy 0.20+.

Core ECS types: Component, Resource, Query, Commands, Startup, Update, Fixed / FixedMain (bevy::time), .chain(), Plugin, DefaultPlugins, MinimalPlugins. Messages and observers are an ownership slot. See bevy-events-messaging for their APIs. Systems run in parallel unless .chain() orders the ones that conflict.

Who owns state

PieceOwnerWho may mutateSchedule
Data on one entityComponentOne system via QueryUpdate or FixedMain
One value for the whole appResourceOne systemStartup to insert, then the schedule that reads it
SpawnCommandsThe spawning systemStartup for the initial world; later schedules for runtime spawn
Order that must not race.chain()The chained systems onlySame schedule
Plugin boundaryPluginbuild registers systems and resourcesBefore the app runs

Borrow rule: two systems that both mutably query the same component must be ordered (.chain()) or split so only one writes. Unrelated systems stay parallel. That is the ECS page rule, not a guess at a system-set API.

Decision

If you needDo thisDo not
Per-entity dataComponent + QueryA Godot node script
App-wide config or clockResourceCopy the value onto every entity
Stable simulation stepFixedMain and the Fixed clockTie simulation to raw frame Update
Startup spawnCommands in StartupSpawn from a render system
Cross-system notice that is not shared stateMessage or observer slot in bevy-events-messagingA new event type invented in this file
An API outside the documented setCheck the official docs firstA made-up crate or API

Load references/ecs-ownership.md for the ownership table.

NEVER

  • Do not pin /0.20.0/ in docs URLs. WHY: links stay on latest; the 0.20 target is stated once in prose.
  • Do not mutably query the same component from two unordered systems. WHY: the schedule runs systems in parallel unless .chain() orders them.
  • Do not invent a physics, navigation, networking, or XR crate here. WHY: this skill only names documented Bevy crates and modules.
  • No Godot ray, shape-cast, or direct-space-state types. WHY: Bevy code stays idiomatic ECS and uses only documented Bevy APIs.
  • No Avian, Rapier, or any other named physics crate as the chosen solver. WHY: Bevy code stays idiomatic ECS and uses only documented Bevy APIs.
  • No invented intersect_ray or mask APIs. WHY: Bevy code stays idiomatic ECS and uses only documented Bevy APIs.

Reference

docs.rs links use the unversioned latest permalink. The library pin on bevy-master stays 0.20.0.

Official Documentation

  • Migration guides - Unversioned hop index.
  • bevy crate - Unversioned API index. No spatial-query module was opened.
  • Assets - Official asset catalog. No query plugin was selected.
  • Examples - Example tree on the latest branch.
  • ECS - Systems, Query, and .chain().
  • bevy::camera - viewport_to_world_2d is a camera map, not a collider query. Details live on bevy-camera-systems.
  • Quick Start: plugins - Third-party add_plugins without a chosen crate.

Related Skills

Prerequisites

Complements

Downstream / consumers

Master

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills