Godot Engine – Rotating a character with transform.basis.slerp

This article is also available on Odysee. rotation_degrees, transform.basis and quaternions If you want to rotate a character towards a point, there are three popular methods you can use: modifying the character’s rotation_degrees.y value, changing the transform.basis or using quaternions. This tutorial will show you how the transform.basis approach works. The transform.basis property of any […]

Godot Engine – How to get the class name of a custom class

If you have ever created custom classes by using class_name MyCustomClass in one of your scripts you might have noticed that these classes don’t return their custom class name when you use get_class() or is_class() on them. This tutorial will show you how to fix this. Let’s say you have a Player.gd script that inherits […]

Godot Engine – How to remap a range of numbers

The explanation of range remapping in this article is universally applicable to every use case where value remapping is required. Towards the end of this article we’ll take a look at how to implement the formula as a function in the Godot game engine. A use case for value remapping Let’s say you create a […]

Godot Engine – Creating references to nodes

Oftentimes you’ll be using $ or get_node() to get a node path in your scene tree. This works great – until you rename or move the node and everything breaks. But there’s a way to make your life easier! You can save a reference to your node that doesn’t break, even if you rename or […]

Godot Engine – Raycast shotgun tutorial

This article is also available on Odysee. This quick tutorial shows you how to use multiple raycasts in the same physics frame in the Godot Engine. This is useful for raycast (also called hitscan) weapons like shotguns that fire multiple pellets at the same time. Here’s the problem: by default, this doesn’t work in Godot […]

Scroll to top