Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

UberPath2D

An asset by opyate
The page banner background of a mountain and forest
UberPath2D image holder but it is empty

Quick Information

0 ratings
UberPath2D icon image
opyate
UberPath2D

A Path2D with smoothing, and utilities for restricting it to any Rect2D

Supported Engine Version
4.1
Version String
0.1
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

godot-uberpath2d

README icon

A Path2D with smoothing, and utilities for restricting it to any Rect2D

Demo

README Demo

Usage

Create a new node of type UberPath2D

Draw a path.

Check Smooth in the editor properties to smooth the path.

In code, restrict your path to a rect like so:

@onready var path: Path2D = $UberPath2D

var path_follow_2d: PathFollow2D = UberPath2D.get_bounded_path_follow_2d(
    $some_container_to_parent_new_nodes_to,
    sprite.get_path(),  # the sprite you want to move along the path
    path.normalized_points,
    rect,
    start_corner
)

# tween it!
await create_tween()\
    .tween_property(path_follow_2d, "progress_ratio", 1.0, 3.5).finished

start_corner(typeVector2i`) is one of

  • (0,0) -> top left
  • (1,1) -> bottom right
  • (0,1) -> bottom left [default]
  • (1,0) -> top right

A Path2D with smoothing, and utilities for restricting it to any Rect2D

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
UberPath2D icon image
opyate
UberPath2D

A Path2D with smoothing, and utilities for restricting it to any Rect2D

Supported Engine Version
4.1
Version String
0.1
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers