Godot Tip 「Tile Collision With Tilemap and a Physics Body」
This is how you can detect what tiles you are colliding with when using a Physics Body.
Information from BipBop (Godot Engine Forms, December 13 , 2023)
Godot Weird Problem:Viewport Texture Error with Model
In Godot, if you set a ViewPort Texture directly on a Material Albedo you will receive a warning when running your game from the editor. This error appears to be harmless in game but it is annoying.
To work around it, you can set it in code:
- Grab a reference to the mesh
- Grab a reference to the viewport/subviewport
- In the _ready() callback, set the texture.
This is not likely to be fixed anytime soon, it's been open since 2022...
Information from MamaDespik (Reddit, April 29, 2024)
Godot Tip 「Game-Isometric Camera」
Using Node: Camera3D
- Projection: Orthogonal
- Rotation: -30, 45, 0 (XYZ)
- Size: 8M-10M (Based on Pixel Size)
- Far: 200M (Fixes issues with Orthogonal Shadows) [Calinou, Godot Issue 58332, Feb 19, 2022]
Quick Code Note for Camera (You may have to rotate input):
Godot Weird Problem:Audio Bus Names Not Working
I've had this issue where the Audio Busses defined would not load on project start up OR they would load but the names would not work. To fix it, I had to do the following:
- Save out your Bus Configuration
- Open the General Settings
- Open Audio -> Buses
- Set the Default Bus Layout
LuaJIT Quick Tip 「Table Clear」
Ever wanted to empty a table without going though a loop or creating a new table and leaving it to the garbage collector?
Just table.clear(that_table)!
If you're writing a library and you're being nice to non-LuaJIT users, then you can just take a bit of extra time to check if it exists.