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

Godot 4 2D Rope Implementation

An asset by bennbollay
The page banner background of a mountain and forest
Godot 4 2D Rope Implementation image holder but it is empty

Quick Information

0 ratings
Godot 4 2D Rope Implementation icon image
bennbollay
Godot 4 2D Rope Implementation

This project creates a Rope class a variety of different ways to support physics-enabled 2D ropes in Godot 4.

Supported Engine Version
4.0
Version String
1.0.0
License Version
Unlicense
Support Level
community
Modified Date
1 month ago
Git URL
Issue URL

Godot 4 2D Rope Implementation

This project creates a Rope class a variety of different ways to support physics-enabled 2D ropes in Godot 4.

Example

README rope_demo_video

Usage

See test/test_rope.gd for the example usage represented here:

Fixed on both ends

Using the RopeEndPiece node as starting and/or end points, create a Rope that extends from that starting node to a specified ending node.

rope = Rope.new($RopeStartPiece)
add_child(rope)
rope.create_rope($RopeEndPiece) # rope_end_piece.global_position)

Customize the length of each line segment

# Create a rope where each segment is 5 px long
rope = Rope.new($RopeStartPiece, 5)

Towards a particular point

rope.create_rope($RopeEndPiece2.global_position)

Towards a specific end piece, but only a certain length

# Create a rope that's 10 segments long that will connect to
# the $RopeEndPiece2 if it reaches it, but will otherwise float
rope.create_rope($RopeEndPiece2, 10)

Grow the rope by five segments

rope.spool(5)

Draw a line over the rope

rope_drawer = RopeDrawSimpleLine.new(grope)
add_child(rope_drawer)

Stop drawing the line

rope_drawer.queue_free()

This project creates a Rope class a variety of different ways to support physics-enabled 2D ropes in Godot 4.

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
Godot 4 2D Rope Implementation icon image
bennbollay
Godot 4 2D Rope Implementation

This project creates a Rope class a variety of different ways to support physics-enabled 2D ropes in Godot 4.

Supported Engine Version
4.0
Version String
1.0.0
License Version
Unlicense
Support Level
community
Modified Date
1 month 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