重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
godot-genre-sports by thedivergentai/gd-agentic-skills
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-genre-sportsRigidBody3D,并使用 apply_central_impulse() 来实现逼真的运球物理效果。continuous_cd = true)以进行高速验证。CollisionShape3D;严格调整资源半径以保持内部的转动惯量。_process() 中施加冲量;严格使用 _physics_process() 或 _integrate_forces() 以防止视觉抖动。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
AnimationTree 以确保动量和转身在视觉上有据可依。RigidBody3D,并使用 apply_central_impulse() 来实现逼真的运球物理效果。is_action_pressed() 处理上下文按钮;严格使用上下文管理器来确定按钮 A 是表示“传球”、“铲球”还是“切换球员”。Area3D 球门触发器;严格使用 await get_tree().physics_frame 以允许物理服务器进行同步。| 阶段 | 技能 | 目的 |
|---|---|---|
| 1. 物理 | physics-bodies, vehicle-wheel-3d | 球的弹跳、摩擦力、玩家碰撞 |
| 2. AI | steering-behaviors, godot-state-machine-advanced | 阵型、盯防、群体行为 |
| 3. 动画 | godot-animation-tree-mastery | 混合的奔跑、射门、铲球动作 |
| 4. 输入 | input-mapping | 上下文按钮(传球/铲球共享按钮) |
| 5. 摄像机 | godot-camera-systems | 动态广播视角、根据动作缩放 |
最重要的对象。手感必须正确。
# ball.gd
extends RigidBody3D
@export var drag_coefficient: float = 0.5
@export var magnus_effect_strength: float = 2.0
func _integrate_forces(state: PhysicsDirectBodyState3D) -> void:
# 应用空气阻力
var velocity = state.linear_velocity
var speed = velocity.length()
var drag_force = -velocity.normalized() * (drag_coefficient * speed * speed)
state.apply_central_force(drag_force)
# 马格努斯效应(弧线球)
var spin = state.angular_velocity
var magnus_force = spin.cross(velocity) * magnus_effect_strength
state.apply_central_force(magnus_force)
AI 球员不只是跑向球。他们跑向相对于球/场地的位置。
# team_manager.gd
extends Node
enum Strategy { ATTACK, DEFEND }
var current_strategy: Strategy = Strategy.DEFEND
var formation_slots: Array[Node3D] # 作为"阵型锚点"子节点的标记
func update_tactics(ball_pos: Vector3) -> void:
# 移动整个阵型锚点
formation_anchor.position = lerp(formation_anchor.position, ball_pos, 0.5)
# 为每个位置分配最佳球员
for player in players:
var best_slot = find_closest_slot(player)
player.set_target(best_slot.global_position)
裁判逻辑。
# match_manager.gd
var score_team_a: int = 0
var score_team_b: int = 0
var match_timer: float = 300.0
enum State { KICKOFF, PLAYING, GOAL, END }
func goal_scored(team: int) -> void:
if team == 0: score_team_a += 1
else: score_team_b += 1
current_state = State.GOAL
play_celebration()
await get_tree().create_timer(5.0).timeout
reset_positions()
current_state = State.KICKOFF
“A”按钮根据上下文执行不同的操作。
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("action_main"):
if has_ball:
pass_ball()
elif is_near_ball:
slide_tackle()
else:
switch_player()
用于实现自然的移动(追逐、逃离、抵达)。
func seek(target_pos: Vector3) -> Vector3:
var desired_velocity = (target_pos - global_position).normalized() * max_speed
var steering = desired_velocity - velocity
return steering.limit_length(max_force)
bounce 和 friction 参数。每周安装量
55
代码仓库
GitHub 星标数
69
首次出现
2026年2月10日
安全审计
安装于
opencode53
gemini-cli52
codex52
amp51
github-copilot51
kimi-cli51
RigidBody3D and use apply_central_impulse() for realistic dribble physics.continuous_cd = true) on the ball's properties for high-velocity validation.CollisionShape3D non-uniformly; strictly adjust the resource radius to preserve the internal moment of inertia._process(); strictly use _physics_process() or _integrate_forces() to prevent visual jitter.AnimationTree with root motion to ensure momentum and turns are visually grounded.RigidBody3D and use apply_central_impulse() for realistic dribble physics.is_action_pressed(); strictly use a ContextManager to determine if Button A means "Pass", "Tackle", or "Switch".Area3D goal trigger immediately; strictly await get_tree().physics_frame to allow the Physics Server to sync.| Phase | Skills | Purpose |
|---|---|---|
| 1. Physics | physics-bodies, vehicle-wheel-3d | Ball bounce, friction, player collisions |
| 2. AI | steering-behaviors, godot-state-machine-advanced | Formations, marking, flocking |
| 3. Anim | godot-animation-tree-mastery | Blended running, shooting, tackling |
| 4. Input | input-mapping |
The most important object. Must feel right.
# ball.gd
extends RigidBody3D
@export var drag_coefficient: float = 0.5
@export var magnus_effect_strength: float = 2.0
func _integrate_forces(state: PhysicsDirectBodyState3D) -> void:
# Apply Air Drag
var velocity = state.linear_velocity
var speed = velocity.length()
var drag_force = -velocity.normalized() * (drag_coefficient * speed * speed)
state.apply_central_force(drag_force)
# Magnus Effect (Curve)
var spin = state.angular_velocity
var magnus_force = spin.cross(velocity) * magnus_effect_strength
state.apply_central_force(magnus_force)
AI players don't just run at the ball. They run to positions relative to the ball/field.
# team_manager.gd
extends Node
enum Strategy { ATTACK, DEFEND }
var current_strategy: Strategy = Strategy.DEFEND
var formation_slots: Array[Node3D] # Markers parented to a "Formation Anchor"
func update_tactics(ball_pos: Vector3) -> void:
# Move the entire formation anchor
formation_anchor.position = lerp(formation_anchor.position, ball_pos, 0.5)
# Assign best player to each slot
for player in players:
var best_slot = find_closest_slot(player)
player.set_target(best_slot.global_position)
The referee logic.
# match_manager.gd
var score_team_a: int = 0
var score_team_b: int = 0
var match_timer: float = 300.0
enum State { KICKOFF, PLAYING, GOAL, END }
func goal_scored(team: int) -> void:
if team == 0: score_team_a += 1
else: score_team_b += 1
current_state = State.GOAL
play_celebration()
await get_tree().create_timer(5.0).timeout
reset_positions()
current_state = State.KICKOFF
"A" button does different things depending on context.
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("action_main"):
if has_ball:
pass_ball()
elif is_near_ball:
slide_tackle()
else:
switch_player()
For natural movement (Seek, Flee, Arrive).
func seek(target_pos: Vector3) -> Vector3:
var desired_velocity = (target_pos - global_position).normalized() * max_speed
var steering = desired_velocity - velocity
return steering.limit_length(max_force)
bounce and friction on the Ball and Field colliders carefully.Weekly Installs
55
Repository
GitHub Stars
69
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode53
gemini-cli52
codex52
amp51
github-copilot51
kimi-cli51
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
125,600 周安装
| Contextual buttons (Pass/Tackle share button) |
| 5. Camera | godot-camera-systems | Dynamic broadcast view, zooming on action |