Index of every page on this site: llms.txt
All skills
jame581 avatar

/math-essentials

@426e8ab
by Jan Mesarčjame581/godotprompter979 stars
63
Run it yourself

Use when implementing game math — vectors, transforms, interpolation, curves, random number generation, and common geometric recipes

Use this Skill: https://skilld.dev/gh/jame581/godotprompter/math-essentials

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescurves-and-paths.md

≈474 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Curves and Paths

Reference for skills/math-essentials/SKILL.md — Curve resources, Path2D / Path3D, PathFollow properties.

← Back to SKILL.md


4. Curves & Paths

Curve Resources

# Curve — 1D curve (maps x: 0.0–1.0 to y value)
var curve := Curve.new()
curve.add_point(Vector2(0.0, 0.0))  # start at 0
curve.add_point(Vector2(0.5, 1.0))  # peak at halfway
curve.add_point(Vector2(1.0, 0.0))  # back to 0
var value: float = curve.sample(0.25)  # sample at 25%

# CurveTexture — wrap Curve for use in shaders/particles
var curve_tex := CurveTexture.new()
curve_tex.curve = curve

Path2D / Path3D

Paths define a Curve2D/Curve3D that nodes can follow.

Level (Node2D)
├── Path2D
│   └── PathFollow2D
│       └── Enemy (CharacterBody2D)
# Move along the path
@onready var path_follow: PathFollow2D = $Path2D/PathFollow2D

func _physics_process(delta: float) -> void:
    path_follow.progress += speed * delta
    # Or use ratio (0.0 to 1.0)
    # path_follow.progress_ratio += 0.1 * delta
private PathFollow2D _pathFollow;

public override void _Ready()
{
    _pathFollow = GetNode<PathFollow2D>("Path2D/PathFollow2D");
}

public override void _PhysicsProcess(double delta)
{
    _pathFollow.Progress += speed * (float)delta;
}

PathFollow Properties

Property Description
progress Distance along the curve in pixels/units
progress_ratio 0.0–1.0 position along the curve
loop Wrap around when reaching the end
rotates Auto-rotate to face the curve direction
cubic_interp Use cubic interpolation for smoother following

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts29d3 checks · Risk SAFE
  • Gen Agent Trust Hub29d

    The skill provides comprehensive documentation and code examples for game-related mathematics in Godot 4.3+, including vectors, transforms, and interpolation. No security issues or malicious patterns were detected.

  • Socket29d

    No alerts

  • Snyk29d

    Risk: LOW · No issues

Signed by skilld at 426e8ab. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 days ago.

Activeupdated last month

README badge

README badge for jame581/godotprompter/math-essentials