Day 4 - Compass & Map


First off, I enabled the shadows and fixed the trees/bushes not having shadows by setting Transparency mode to Depth Pre-Pass. We also set the Cull mode to Disabled so both sides of the meshes are visible.
And the result is much better feeling scene.
Before:
After:
I also created compass and map today. Glass part is just a plane with low alpha, and slight blue tint.
Map texture is created by:
Finding an old book page in textures.com
Stretching it to make it square
Copying one of the sides to top and bottom
Adjust alpha so that there is no pixels with low alpha value, you can press Ctrl + M to open this and make your curve similar to the one in the image below.
And here are compass & map in the game.
Also here’s the compass logic if you want something similar for your game. You might need to slightly adjust north angle based on your compass’s default pin rotation.
class_name Compass extends Node3D
@export_range(-180, 180) var north: float = -180
@export var compass_pin: Node3D
func process(delta: float) -> void:
var new_rot:float = global_rotation.y - deg_to_rad(north)
if Vector3(0, -new_rot, 0) != compass_pin.get_rotation():
compass_pin.rotation.y = lerp_angle(compass_pin.rotation.y, -new_rot, .5)
I wish you a happy day!
Subscribe to my newsletter
Read articles from Cagri Benli directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
