xiaohongshu
xiaohongshu
godot-sync-static-positions
Use when Godot nodes have position set in both .tscn (editor) and _ready() (code), creating confusion about actual runtime position. Detects static position assignments that conflict with editor values. Syncs to single source of truth, making editor preview match game behavior (WYSIWYG).
Full skill instructions
What You See Is What You Get. Editor preview should match game behavior for static positions.
Finds conflicts like:
# enemy.gd
func _ready():
position = Vector2(500, 300) # Code says here
# enemy.tscn
[node name="Enemy" type="CharacterBody2D"]
position = Vector2(100, 100) # Editor says here
# RESULT: Confusing! Editor shows wrong position
Resolves to:
# enemy.gd
func _ready():
# Position is set in scene file for editor visibility
pass
# enemy.tscn
[node name="Enemy" type="CharacterBody2D"]
position = Vector2(500, 300) # Updated to match intended position
# RESULT: Editor preview matches game
Identifies:
func _ready():
position = Vector2(100, 150) # STATIC CONFLICT
global_position = Vector2(500, 300) # STATIC CONFLICT
func _ready():
$Sprite.position = Vector2(10, 20) # Child position conflict
get_node("CollisionShape2D").position = Vector2(0, 0)
func _ready():
position = Vector2(100, 100)
rotation = deg_to_rad(45) # Also position-related
scale = Vector2(2, 2)
Placing objects in editor but code overrides positions.
"Why is this node in the wrong place?"
Want editor preview to be accurate.
Level designers need accurate editor preview.
Move code value to .tscn, remove from code.
When to use:
Example:
# Before
func _ready():
position = Vector2(500, 300)
# After
func _ready():
# Position is set in scene file
pass
# enemy.tscn updated
position = Vector2(500, 300)
Remove editor value, keep code assignment.
When to use:
Example:
# Before
func _ready():
position = spawn_point.position + offset # Dynamic!
# After
func _ready():
# Position is dynamically calculated (see spawn_point)
position = spawn_point.position + offset
# enemy.tscn - position removed or set to (0,0) as placeholder
Keep both but add clear comments.
When to use:
Example:
# Before
func _ready():
position = start_position
# After
func _ready():
# Editor position is default spawn, overridden to start_position
position = start_position
Identifies STATIC conflicts (fixes these):
func _ready():
position = Vector2(100, 100) # Literal constant - STATIC
position = Vector2(CONSTANT_X, CONSTANT_Y) # Constants - STATIC
$Child.position = Vector2(10, 10) # Literal - STATIC
Skips DYNAMIC positioning (intentional):
func _ready():
position = player.position # Variable reference - DYNAMIC
position = get_spawn_point() # Function call - DYNAMIC
if some_condition:
position = Vector2(100, 100) # Conditional - DYNAMIC
func _process(delta):
position = target # Every frame - DYNAMIC (skip)
Key distinction: Static = same every time, Dynamic = varies at runtime
# Before: Code says (500, 300), editor says (0, 0)
func _ready():
position = Vector2(500, 300)
# After: Editor updated, code removed
# enemy.tscn: position = Vector2(500, 300)
# Before: Child offset in code, not editor
func _ready():
$Sprite.position = Vector2(0, -10)
# After: Sprite position moved in .tscn
# enemy.tscn: [node name="Sprite"] position = Vector2(0, -10)
# Before: Position, rotation, scale all in code
func _ready():
position = Vector2(100, 100)
rotation = deg_to_rad(45)
scale = Vector2(1.5, 1.5)
# After: All properties in .tscn, code clean
# enemy.tscn has all three properties set
Works with:
Don't sync if:
Valid code-controlled positions:
# These should NOT be synced to .tscn
func _ready():
position = get_spawn_location_from_data() # Data-driven
position = player.position + offset # Relative to player
position = area.get_random_point() # Procedural
After syncing, clear patterns emerge:
| Position Type | Owner | Example |
|---|---|---|
| Static spawn points | Editor (.tscn) | Enemy spawn locations |
| Child node offsets | Editor (.tscn) | Sprite relative to parent |
| Dynamic positions | Code (_ready, _process) | Follow player, procedural |
| Animation positions | AnimationPlayer | Animated movement |
| Physics positions | Physics engine | RigidBody2D |
After syncing, validates:
# Position is set in scene file at (500, 300)
# Rotation is controlled by AnimationPlayer "rotate"
# Scale is controlled by code (dynamic resizing based on health)
Clear ownership = clear code = fewer bugs.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience