icon 字幕
正在加载字幕...

📖01 ‣ 📼02 ‣ Player State Machine ‣ Metroidvania Forge Godot 4 Tutorial Series

youtube 翻译 youtube 中文翻译 youtube 字幕 youtube 中文字幕 youtube 翻译成中文 youtube 视频翻译 youtube translate to chinese translate youtube to chinese youtube transcript to chinese translate youtube video to chinese

YouTube transcript, YouTube translate

32/32

A quick preview of the first subtitles so you know what the video covers.

Hey everybody. In today's video, we're going to take Pink Box Hero here, create new state machine that we can use to control him, and get you set up for the next video where we're going to start building the runin idle states. [Music] All right. Now, as we get started looking at our player here and how we're going to improve it, I want to just quickly review what I did with the level. So, I I issued a homework assignment for you guys to go ahead and flesh out this little scene and and build a little level. And you can see I even came in here and I and I created this little rotated sprite down here so that I have a slope to walk on. And I'm going to go ahead and just run this real quick and see if it works. And it should work. Um, I I hope some of you guys tried something like that out. And by default, these these character body 2Ds that GDAU has, they handle slopes like this pretty well. And uh, we might run into some minor issues with it later on. But as you can see, it I can move up and down the slope just fine. But there we go. I've got a level. I've got a little block here that I could jump on. I made that block two pieces tall. So I just kind of scaled it by two so that it's 64x 64 pixels. And then that way I kind of have a good reference for maybe what a larger block looks like. What we're going to be talking about in this video is of course the player state machine. And what we built in our previous video was this really simple rudimentary player with a simple script. And we've just got a few things happening here in our physics process. And we're doing some input detection just to kind of test things out. A really good comment in my last video mentioned how he hears that we shouldn't really be multiplying the velocity by delta um before we use move and slide because move and slide will already account for the delta. And he's he's 100% correct. But we are not actually multiplying the velocity by the delta. We're just multiplying this gravity amount to see how much gravity to apply. And so there could be, you know, some confusion there. I But this is not a bad practice. But it would be a bad practice if we were to just, you know, multiply like that and try and use delta because again,

设置

100%

翻译目标语言

🔊 音频播放
正在播放翻译音频