# Projectile Arc Tuning for Godot

Use launch angle, speed, gravity, and time steps to sketch a projectile arc before tuning a cannon, thrown item, jump shot, or ball path by feel.

## Outcome
Build a one-launch Godot proof where the predicted arc, actual projectile path, first hit, and tuning notes can be compared.

## Safe first step
Sketch one launch point, one target, one gravity value, and one time window before adding effects or enemies.

## Ladder steps
### 1. Name the launch frame
Choose one origin, one angle, and one speed before adding spread or animation.

Check: The projectile starts from a visible point with a written velocity.

### 2. Split velocity into x and y
Angle and speed become horizontal and vertical components.

Check: The initial velocity can be written as a vector.

### 3. Step time forward
Gravity changes vertical velocity each step while horizontal velocity stays simple in a first pass.

Check: The arc points can be predicted before firing.

### 4. Compare preview to hit
The first useful game proof is the difference between the predicted path and actual collision.

Check: The note names one mismatch to test next.

## Examples
### Turn angle and speed into launch velocity
```sh
velocity = Vector2(cos(angle), -sin(angle)) * speed
```
Expected signal: A first velocity vector for the projectile

### Step the arc
```sh
position += velocity * delta; velocity.y += gravity * delta
```
Expected signal: Each frame moves the projectile and bends the path downward

### Log one launch
```sh
print(position, velocity)
```
Expected signal: The path can be compared to the preview instead of guessed

## Common traps
- Tuning speed, gravity, target distance, collision, and animation all at once.
- Forgetting that screen y usually grows downward in 2D games.
- Using a pretty trail before one projectile hit can be repeated.
- Treating the preview line as truth without comparing it to the actual physics object.

## Practice task
Use the widget to choose angle, speed, gravity, and time. Copy the note, then build one projectile scene and compare the preview arc to the actual hit.

## Next steps
- Save the Obsidian note with [[Godot]], [[Projectile Motion]], [[Launch Velocity]], [[Gravity]], [[Delta Time]], [[Trajectory Preview]], [[Collision]], [[Vector2]], and [[Game Physics]] backlinks.
- Use trigonometry when launch angle and horizontal reach are the confusing part.
- Use calculus for game motion when acceleration and frame stepping need deeper tuning.
- Use collision normal bounce math when the projectile needs to reflect after impact.
- Use the source-video notes workflow to preserve timestamps, preview settings, and test results beside the project.

## Related
- [Build a first Godot game loop](/projects/build-first-godot-game-loop/)
- [Sprite-animated 2D game loop](/learn/games/sprite-animated-2d-game-loop/)
- [Tilemap level layout math](/learn/games/tilemap-level-layout-math/)
- [Collision normal bounce math](/learn/games/collision-normal-bounce-math/)
- [2D transform stack for sprites](/learn/games/2d-transform-stack-for-sprites/)
- [Trigonometry for rotation and layout](/learn/trigonometry-for-rotation-and-layout/)
- [Calculus for game motion](/learn/math/calculus-for-game-motion/)
- [Vectors for maker projects](/learn/vectors-for-maker-projects/)
- [Turn source videos into notes](/video-notes/)
- [Review Anki-compatible decks](/decks/)

## Obsidian backlinks

Use these wiki links to connect this note inside a local maker vault:

- [[TopicLadder]]
- [[Maker Learning]]
- [[Projectile Arc Tuning for Godot]]
- [[Games and Interactive Tools]]
- [[game-dev]]
- [[project-path]]
- [[Name the launch frame]]
- [[Split velocity into x and y]]
- [[Step time forward]]
- [[Compare preview to hit]]
- [[Build a first Godot game loop]]
- [[Sprite-animated 2D game loop]]

## Source and next routes

Source: https://topicladder.com/learn/games/projectile-arc-tuning-for-godot/

- [Build a first Godot game loop](/projects/build-first-godot-game-loop/)
- [Sprite-animated 2D game loop](/learn/games/sprite-animated-2d-game-loop/)
- [Tilemap level layout math](/learn/games/tilemap-level-layout-math/)
- [Collision normal bounce math](/learn/games/collision-normal-bounce-math/)
- [2D transform stack for sprites](/learn/games/2d-transform-stack-for-sprites/)
- [Trigonometry for rotation and layout](/learn/trigonometry-for-rotation-and-layout/)
- [Calculus for game motion](/learn/math/calculus-for-game-motion/)
- [Vectors for maker projects](/learn/vectors-for-maker-projects/)
