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

Dynamic Catenary

An asset by Donitzo
The page banner background of a mountain and forest
Dynamic Catenary hero image

Quick Information

0 ratings
Dynamic Catenary icon image
Donitzo
Dynamic Catenary

A dynamic catenary node and shader for Godot engine (for hanging chains, ropes etc.)."In physics and geometry, a catenary is the curve that an idealized hanging chain or cable assumes under its own weight when supported only at its ends in a uniform gravitational field"- WikiThe idea came from an excellent tutorial by Alan Zucconi, in which he describes the math behind catenaries. I used these formulas plus some original ideas to implement a new catenary node type in Godot.

Supported Engine Version
3.5
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

godot-catenary

A dynamic catenary node and shader for Godot engine (for hanging chains, ropes etc.).

In physics and geometry, a catenary is the curve that an idealized hanging chain or cable assumes under its own weight when supported only at its ends in a uniform gravitational field

Wiki

Example of the node in action:

README Preview

About

The idea came from this excellent tutorial by Alan Zucconi, in which he describes the math behind catenaries. I used these formulas plus some original ideas to implement a new catenary node type in Godot.

Notable improvements are:

  1. The model will be scaled evenly along the entire curve
  2. Support for swinging catenaries
  3. GPU-driven rendering and animations

How to use

This repository contains a demo Godot project in the src folder which will demonstrate the usage of the catenary node. To use the node in your own project, simply Copy these two files:

# scripts/catenary.gd - The GDScript
# shaders/catenary.tres - The shader

The Catenary node acts as the starting point for the curve. The target path points towards another node which will act as the end point of the curve.

The catenary node can be used ingame or in the editor, as it is a tool.

There are a number of parameters to set before the node works:

# The mesh with the rope-like object spanning the x-axis
mesh

# The end point target
target_path

# Whether to track the target node ingame using process
track_target

# The real-world length of the catenary (limited by the distance between the start/end point)
length

# The scale multiplier of the yz-axes of the mesh
width

# The catenary swing angle in radians
swing_angle

# The catenary swing frequency
swing_frequency

The length parameter adjusts the actual length of the cable/rope. If the length is longer than the distance between the start and end point, the curve will sag.

README Hanging cables

Last words

I hope you find this tool useful. Please raise an issue if you discover a bug or just have general feedback.

A dynamic catenary node and shader for Godot engine (for hanging chains, ropes etc.).

"In physics and geometry, a catenary is the curve that an idealized hanging chain or cable assumes under its own weight when supported only at its ends in a uniform gravitational field"

- Wiki

The idea came from an excellent tutorial by Alan Zucconi, in which he describes the math behind catenaries. I used these formulas plus some original ideas to implement a new catenary node type in Godot.

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
Dynamic Catenary icon image
Donitzo
Dynamic Catenary

A dynamic catenary node and shader for Godot engine (for hanging chains, ropes etc.)."In physics and geometry, a catenary is the curve that an idealized hanging chain or cable assumes under its own weight when supported only at its ends in a uniform gravitational field"- WikiThe idea came from an excellent tutorial by Alan Zucconi, in which he describes the math behind catenaries. I used these formulas plus some original ideas to implement a new catenary node type in Godot.

Supported Engine Version
3.5
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
2 years 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