Рет қаралды 2,109
#gamedev #godot #godot4
00:35 The Code
03:01 The Math
11:02 The Scene
13:32 Q&A
15:19 Bugs
I'll show you how to calculate the point to shoot at in order to hit a moving target. I am not using hitscan weapons. No raycasts are used. All projectiles move through space over time.
This works in 2D and 3D. I'll demonstrate using Godot 4.2 in 3d and I will explain the math. There's also a surprisingly detailed discussion of our choice of bullet scene root node and how to apply decals.
Link to github page of the Godot project:
github.com/nea...
Link to a zip file of the Godot project:
drive.google.c...
Free assets used are available here:
kenney.nl/asse...
and here:
www.freepngimg...
For the bullet hole decals I used moeDev's "How to Create Improved Decal/Bullet holes In Godot 4." tutorial:
• How to Create Improved...
Dot Product Properties:
en.wikipedia.o...