How Godot's Transform3D Type Works

  Рет қаралды 504

Majikayo Games

Majikayo Games

Күн бұрын

This video gives an explanation of Godot's Transform3D and Basis types. It shows how they are actually 3x4 and 3x3 matrices under the hood, and gives an introductory explanation of matrix math.
Rotation matrix visualization web demo I used in the video: majikayogames.github.io/rotat...
Godot Transform3D documentation: docs.godotengine.org/en/stabl...
Contents of this video:
0:00 - Intro
0:15 - Using transform.basis for character movement
1:42 - What is a Transform3D?
3:18 - Using transform.inverse()
5:53 - Basis explanation & visualization
9:00 - Transform3D is a 3x4 matrix
11:05 - Refresher on Vectors
12:36 - 2D basis visualization
18:56 - 3D basis & transforms
23:29 - Outro

Пікірлер: 22
@peschken23
@peschken23 18 күн бұрын
this is probable the most clear and thorough explantations of 3D transforms I have yet encountered. Saved, keep it up!
@MajikayoGames
@MajikayoGames 18 күн бұрын
AWESOME!!! Thank you so much for your comment. Wasn't sure how this would be received but I tried to make it as clear as possible.
@nick12791
@nick12791 17 күн бұрын
​@@MajikayoGames You make a great teacher!
@MrCytrus
@MrCytrus 15 күн бұрын
honestly best explanation i heard so far, everything is detailed and you take your time with the explanation without skipping over anything. this vid deserves more views 👍
@MajikayoGames
@MajikayoGames 15 күн бұрын
Awesome!! :) thanks so much glad you enjoyed. My goal was to make it as clear as possible. Tried to pack a lot of detail in there so it was accessible to beginners and intermediate learners too.
@edkrumbhaar7757
@edkrumbhaar7757 16 күн бұрын
Nice job... as I am not a programmer but seeing this, I sort of understand it. More importantly, it's interesting to learn.
@XylophoneAtomique
@XylophoneAtomique 9 күн бұрын
Finally I understand some of the things ! Thank you!
@icidoxy
@icidoxy 17 күн бұрын
Hello! I've spent two full days on how to correctly rotate a mesh inside of a node, so all this stuff about local/global transforms is really helpful. Will definitively share this guide, thanks a lot! ❤
@MajikayoGames
@MajikayoGames 17 күн бұрын
Awesome! So glad it helped. Let me know if you have any questions about it :)
@user-mu9bz6bg7s
@user-mu9bz6bg7s 13 күн бұрын
Epic explanation thank you
@nataliereilly7895
@nataliereilly7895 9 күн бұрын
👍🏽👍🏽👍🏽
@JasonAtNovaleaf
@JasonAtNovaleaf 15 күн бұрын
Really great tutorial! could you let us know what addons you used for things like the debug draw / text?
@MajikayoGames
@MajikayoGames 15 күн бұрын
Thank you:)! The dev console is a basic one i made. I'm planning on releasing it along with my fps controller once it is done. For now it is just a simple prototype I made for this tutorial. I just use the Expression class to run methods, and save command history in the LineEdit.
@Rattja
@Rattja 17 күн бұрын
Quick question. I know this is not the topic of the video, but why is the movement input in the beginning in the _physics_process? Recently did some testing in order to understand the difference between it and _process, and it seems that any input is only updated and/or handled in _process, never in _physics_process. So basically what I found was that any method on Input, like get_vector() is ignored if it happens in between frames while in either of the process functions, and anything triggered in _input() only runs on the next _process(). So just curious of the reasoning for putting it there I guess, maybe I am missing something?
@tech6hutch
@tech6hutch 16 күн бұрын
Anything involving physics (like movement) should happen there
@Rattja
@Rattja 16 күн бұрын
@@tech6hutch Yes, I get that part, the issue is that the input is not handled in the physics. What that means is that input in _physics_process() can be missed if shorter than the frame, while _input() does not, but _input() only runs on _process before _physics_process, which results in the input being the same for all _physic_process calls within that frame. I guess move_and_slide should be in _physics_process(), but it won't really change anything as it will move on the vector set in _process for the entire frame. So the result is the same. So for input based control, it makes little sense to me to have it there, or at least in this way.
@tech6hutch
@tech6hutch 16 күн бұрын
@@Rattja ah, if I’m understanding, there’s no reason in particular that it’s at the beginning of the method compared to anywhere else in it. I put it towards the middle since I handle actions before movement.
@Rattja
@Rattja 16 күн бұрын
@@tech6hutch Oh, no, not in the beginning of method. I just meant in the beginning of the video. The question was why is it in the _physics_process() method.
@MajikayoGames
@MajikayoGames 16 күн бұрын
Interesting, I just tested this myself, and you are right. It looks like in some cases, placing especially Input.is_action_just_pressed into _physics_process can result in completely missed inputs. If I set the physics frames per second to 10, much lower than the game FPS, jumping via Input.is_action_just_pressed seems to completely break. Not sure if it would matter for regular the regular get_vector functions. But looking it up, seems like most people agree _input or _process is the best place to poll for input to prevent input delays or missed inputs. Thanks for your comment, appreciate it! I didn't know this so it was good to learn.
Procedurally Generated 3D Dungeons
10:26
Majikayo Games
Рет қаралды 28 М.
Joven bailarín noquea a ladrón de un golpe #nmas #shorts
00:17
How To Choose Ramen Date Night 🍜
00:58
Jojo Sim
Рет қаралды 62 МЛН
How many pencils can hold me up?
00:40
A4
Рет қаралды 13 МЛН
Coding Terrain From Scratch In Godot
49:28
Majikayo Games
Рет қаралды 3,4 М.
Devlog 0 -- Bonsai Voxel Engine
4:45
Jesse Hughes
Рет қаралды 6 М.
Comparing 3D Performance of Godot and Unity Game Engine
9:58
Smart Penguins
Рет қаралды 40 М.
Tutorial: First Person Movement In Godot 4
18:25
Bramwell
Рет қаралды 129 М.
Smooth Up & Down Stair Handling | Godot 4 FPS Controller Tutorial
30:38
LEVEL UP Your Game Design Toolkit (Godot for Beginners)
23:30
Coco Code
Рет қаралды 116 М.
Making Godot Look Good! -- 4 Great Demo Scenes for Godot 4
14:20
Gamefromscratch
Рет қаралды 95 М.
Handling Walking Up and Down Stairs in Godot
28:13
Majikayo Games
Рет қаралды 12 М.
Joven bailarín noquea a ladrón de un golpe #nmas #shorts
00:17