Posts

Godot 2.1 Useful notes

Godot Engine 2.1 - Control Panel Gradient Shader

Image
Simple gradient shader for Control Panel

Shake 3D camera script (Godot Engine 2.1)

I've fixed this shake 2d camera script for 3d camera to use it in 3d games.

Bubble sort in GDScript (Godot Engine 2.1)

I was needed to sort some game objects by position on the screen. There are a lot of sorting algorithms , and simplest one is the Bubble Sort algorithm. It works fine for me because I have the small count of objects to sort.  There is the code example in GDScript that sorts simple array of numbers:

Trying to create a beam in Godot Engine. How to do that?

Image
Desired beam: Try 1. Must be something like this. But it doesn't work Try 2: 1. Fix a shader. Connect it to UV. 2. Use 2 crossed cubes with Z scale equal 0.00001. 3. Apply shader to those cubes Try 3. 1. Replace TextUniform to ColorRamp 2. Remove ColorRamp from Diffuse socket Now it looks great!