roblox-physics
하는 일
이 스킬은 Roblox 파트가 떨어지고, 충돌하고, 발사체에 맞는 것처럼 물리적으로 움직이게 하는 방법을 설명합니다. 차량, 발사체 또는 움직이는 객체를 만드는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Roblox에서 파트가 떨어지거나, 튕기거나, 충돌하거나, 힘을 받아 움직여야 할 때.
- ✓발사체나 피격 감지가 Touched에 의존하지 않고 안정적으로 작동하기를 원할 때.
- ✓오래된 BodyMover 스크립트나 제약된 객체가 깨지거나 불안정할 때.
스킬 링크
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/other-engines/roblox-physics/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 Roblox 발사체가 벽을 통과해요. 벽에 확실히 부딪히게 하려면 어떻게 해야 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
각 목표에 맞는 방식(물리 시뮬레이션, 즉각적인 충격, 서버 피격 확인 등)을 고르고, 설계에 맞는 충돌 및 쿼리 규칙을 설정하도록 돕습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Roblox physics
Choose deliberately between simulation, character control, hit detection, and visual-only motion;
they are different jobs. Targets Roblox's rolling platform APIs. Pair with physics-tuning for
engine-neutral stability and feel.
When to use
- Use for BasePart assemblies, constraints, collision/query policy, ray/overlap queries, forces, impulses, moving physical objects, network ownership, or physics cleanup.
- Use when
Touchedis unreliable/security-sensitive, parts tunnel or jitter, a mechanism breaks when anchored, or old BodyMover patterns appear.
When not to use: ordinary Humanoid lifecycle/control belongs to roblox-characters; remote
validation belongs to roblox-networking; decorative UI/world motion may only need a tween.
Decide the system first
| Goal | Mechanism |
|---|---|
| sustained physical interaction | unanchored assembly + modern constraints/forces |
| instantaneous physical change | ApplyImpulse / ApplyAngularImpulse |
| kinematic platform/path | controlled pivot/transform with an explicit passenger policy |
| character locomotion | Humanoid/custom character controller (roblox-characters) |
| authoritative hit test | server raycast/overlap with filters and gameplay validation |
| cosmetic trail/recoil | local visual motion; no gameplay authority |
Workflow
- Inspect the mechanism. In Studio, visualize assemblies, anchors, constraints, collision groups, massless parts, and network owners. Identify the assembly root and intended authority.
- Define interaction policy. Write the collision-group matrix and separately decide
CanCollide,CanTouch, andCanQuery. These flags are not interchangeable. Register groups in the Studio Collision Groups editor or withWorkspace:RegisterCollisionGroup()andWorkspace:CollisionGroupSetCollidable(); thePhysicsServicecollision-group methods are deprecated and forward toWorkspace. - Choose simulation or query. Do not use
.Touchedas a universal hit detector. Use a ray for a path/line, an overlap query for a volume, and simulation contacts when physical response is actually required. - Apply motion at assembly level. Forces on a part affect its assembly. Use modern
LinearVelocity,AngularVelocity,VectorForce,AlignPosition, andAlignOrientationconstraints as appropriate; migrate deprecated BodyMovers when changing that system. - Set ownership deliberately. Server-own gameplay-critical loose assemblies when required; client ownership can improve responsiveness but never authorizes gameplay results.
- Bound cost and lifetime. Reuse query parameters, cap query frequency/result count, remove temporary constraints/attachments, and disconnect event listeners.
- Verify under load and multiplayer. Test anchored/unanchored transitions, mass extremes, collision matrix, fast motion, multiple clients, ownership changes, streaming, and cleanup.
Pattern: filtered server raycast
local Workspace = game:GetService("Workspace")
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {shooterCharacter}
params.IgnoreWater = true
params.CollisionGroup = "WeaponQuery"
local direction = aimDirection.Unit * MAX_RANGE
local result = Workspace:Raycast(muzzlePosition, direction, params)
if result then
local model = result.Instance:FindFirstAncestorOfClass("Model")
local humanoid = model and model:FindFirstChildOfClass("Humanoid")
if humanoid and serverCanDamage(shooter, model, result.Position) then
humanoid:TakeDamage(serverWeaponDamage(shooter))
end
end
The server must validate the origin/direction against server-known character/weapon state; do not accept an arbitrary client origin and treat the raycast itself as validation.
Pattern: overlap volume with explicit policy
local params = OverlapParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {sourceCharacter}
params.CollisionGroup = "DamageQuery"
params.MaxParts = 64
local seen: {[Model]: boolean} = {}
for _, part in Workspace:GetPartBoundsInBox(hitboxCFrame, hitboxSize, params) do
local model = part:FindFirstAncestorOfClass("Model")
if model and not seen[model] then
seen[model] = true
validateAndApplyHit(model)
end
end
Bounds queries use bounding boxes and can include multiple parts from one ta
자주 묻는 질문
피격 감지에 Touched를 쓰지 않는 이유는 무엇인가요?
이 스킬은 Touched가 신뢰할 수 없고 악용될 수 있다고 설명하며, 그래서 서버 레이캐스트나 겹침 확인을 선호합니다.
캐릭터 이동도 다루나요?
아니요. 휴머노이드 이동은 별도의 Roblox 캐릭터 스킬에서 다룹니다.
물리 느낌을 조정하는 것도 다루나요?
일부만 다룹니다. 엔진과 무관한 조정은 별도의 물리 조정 스킬에서 다룹니다.
상세 정보
작성자의 원본 설명
Implement Roblox physical simulation and queries with assemblies, anchoring, constraints, collision groups, CanCollide/CanTouch/CanQuery, raycasts and overlap queries, mass, impulses, forces, velocity, moving assemblies, cleanup, and network ownership. Use for Roblox collisions, hit detection, RaycastParams, PhysicsService, projectiles, vehicles, knockback, constraints, deprecated BodyMovers, unstable motion, or client-owned physics exploits.
인기도
- GitHub 스타
- 6.6k
- 순위
- #13840
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 28.
댓글
- …
이 저장소의 다른 스킬
router
6.6k에이전트가 엔진과 작업 종류를 파악해, 요청에 맞는 게임 개발 스킬을 골라 주도록 돕습니다.
ai-behavior-trees-utility-ai
6.6k에이전트가 적이나 캐릭터가 우선순위와 점수로 행동을 고르는 행동 트리와 유틸리티 AI 시스템을 만들도록 돕습니다.
audio-design
6.6k에이전트에게 게임 오디오 믹싱을 가르칩니다. 버스, 데시벨 음량, 대사 아래에서의 덕킹, 적응형 음악, 효과음 변주를 다룹니다.
camera-systems
6.6k에이전트가 부드럽게 따라가고, 레벨 안에 머물고, 3D에서 회전하거나 둘러볼 수 있는 게임 카메라를 만들도록 돕습니다.