All Projects → dbp8890 → line-renderer

dbp8890 / line-renderer

Licence: MIT license
A GDScript implementation of a line renderer in Godot.

Programming Languages

GDScript
375 projects

Labels

Projects that are alternatives of or similar to line-renderer

godot-plugin-refresher
Adds a dropdown and refresh button combo to the toolbar for instantly toggling off/on a plugin. Enables faster workflows for Godot plugin developers.
Stars: ✭ 104 (+316%)
Mutual labels:  godot
terrain-tool-godot4
GODOT 4 3D Terrain Editor (C# Plugin)
Stars: ✭ 22 (-12%)
Mutual labels:  godot
OpMon-Godot
An open source Pokemon-inspired game, now with Godot
Stars: ✭ 50 (+100%)
Mutual labels:  godot
Virtual-Joystick-Godot
A simple virtual joystick for touchscreens, for both 2D and 3D games, with useful options.
Stars: ✭ 231 (+824%)
Mutual labels:  godot
godot-ci
Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
Stars: ✭ 316 (+1164%)
Mutual labels:  godot
godot-size-benchmarks
Benchmarks to compare Godot binary sizes with different build-time options
Stars: ✭ 36 (+44%)
Mutual labels:  godot
Godot-3.0-Noise-Shaders
Godot 3.0 Noise Shaders
Stars: ✭ 38 (+52%)
Mutual labels:  godot
godot-uuid
Unique identifier generation v4 for Godot Engine
Stars: ✭ 96 (+284%)
Mutual labels:  godot
Logic-Circuit-Simulator
A free and open-source Logic Circuit Simulator built in Godot Engine.
Stars: ✭ 23 (-8%)
Mutual labels:  godot
godot-editor-theme-explorer
Godot Editor plugin to browse various items of Editor Theme, such as icons, colors and fonts.
Stars: ✭ 61 (+144%)
Mutual labels:  godot
godot-custom-mobile-template
Godot Game Engine Custom Mobile Template
Stars: ✭ 70 (+180%)
Mutual labels:  godot
Freedom-Hunter
Monster Hunter like action RPG game
Stars: ✭ 71 (+184%)
Mutual labels:  godot
godot-lod-demo
Demonstration project for the Level of Detail (LOD) Godot 3.x add-on
Stars: ✭ 34 (+36%)
Mutual labels:  godot
godothub client
GodotHub Client Class, Multiplayer and network messaging for Godot
Stars: ✭ 16 (-36%)
Mutual labels:  godot
godot-FLMusicLib
GDNative library that plays mp3, chiptune and tracker music files using Game Music Emu, Minimp3 and openmpt
Stars: ✭ 38 (+52%)
Mutual labels:  godot
godot-nightly
A program to download the latest version of Godot Nightly Builds
Stars: ✭ 23 (-8%)
Mutual labels:  godot
-godot-gj-api
GameJolt API plugin for Godot Engine
Stars: ✭ 45 (+80%)
Mutual labels:  godot
BitKnight
BitKnight is a side-scroller adventure game in the style of Nokia 3310 games
Stars: ✭ 23 (-8%)
Mutual labels:  godot
triple-triad-godot
Re-implementation of Triple Triad from Final Fantasy VIII. Made with Godot 3
Stars: ✭ 61 (+144%)
Mutual labels:  godot
surfacer
AI and pathfinding for 2D-platformers in Godot.
Stars: ✭ 56 (+124%)
Mutual labels:  godot

Line Renderer

A GDScript implementation of a line renderer in Godot, useful for rendering cylindrical volume such as lasers, trails, etc. Based on the helpful C# implementation by @paulohyy at https://github.com/paulohyy/linerenderer, with some additional features such as UV tiling and a .tscn file for ease of use.

Instructions

  1. Simply download and unzip the folder, which contains a demo project. If the demo project is not needed, the LineRenderer subfolder can be copied directly into the Godot project.
  2. Drag and drop the LineRenderer.tscn scene into the project, and you should see a line! Note: There appears to be a bug in certain versions of Godot 3.0 that causes problems involving not being able to edit instanced arrays. Make sure to right click and toggle "Discard Instancing" if you encounter this.

To edit the line's points, simply edit the points member variable of the line renderer, and add/remove points from the array (see demo project for details). This can also be done via the editor in Godot.

Demonstration

Features

  • Start thickness/end thickness: how thick to make the line, which will be interpolated between each segment.
  • Corner smooth/cap smooth: how much smoothing to apply to the line's corners/caps. Generally, values around 5 work well. A value of 2 results in pointed corners/caps.
  • Draw caps/corners: Enables/disables drawing caps or corners separately.
  • Global coords: If enabled, the line's points are assumed to be global coordinates, which are independent of the line's transform or its parent. To have the line move/rotate with either itself or its parent, uncheck this so that the points are local.
  • Scale texture: Checking this box tiles the texture, automatically repeating in the line's axial direction. Unchecking this box stretches the texture instead along the line's segments.

Limitations

  • Since this effectively uses camera-facing billboards, as with most billboards, certain angles can break the illusion of cylindrical volume.
  • Corners and caps currently have suboptimal UV mapping, but textures formed in the shape of a line should generally work well.
  • Texture scaling doesn't connect neatly to each segment at the moment; however, this is not very noticable in most cases.

Demo Instructions

To use the demo, click anywhere on the screen to add a line segment. The camera automatically orbits around a point; use the arrow keys to change direction.

License

MIT License (credit to @paulohyy for initial implementation)

Other

Next up: trails! I'll try to see if I can implement this if I have the time. (Although this can be done with the Line Renderer, camera-facing/billboarded trails are not always desired.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].