1 00:00:05,830 --> 00:00:06,440 Hey everyone. 2 00:00:06,870 --> 00:00:10,710 So now we are done with the defining dysfunctions and I'll just emotion is left. 3 00:00:10,950 --> 00:00:18,200 So you know Ed Koch it would be why we have only two kinds of emotion right and left. 4 00:00:18,200 --> 00:00:23,990 And for both of these days a condition labor and moving right then I can only just move up to right 5 00:00:24,650 --> 00:00:30,530 until my ex to have this catch it at like this point is less than the total weight of this canvas and 6 00:00:30,530 --> 00:00:38,620 I can move in left until my ex one of this catcher is always greater than this will or we can say zero. 7 00:00:39,200 --> 00:00:40,640 So these are only two conditions. 8 00:00:40,640 --> 00:00:43,240 We need to focus for the emotion. 9 00:00:43,330 --> 00:00:45,920 No I will define two functions here. 10 00:00:45,950 --> 00:00:53,520 First one is the move left and parse this one a barometer event after that one. 11 00:00:53,530 --> 00:00:57,090 I will define move under school right. 12 00:00:57,130 --> 00:01:00,310 And the same barometer event depend on the key. 13 00:01:00,310 --> 00:01:00,900 I'm pissed. 14 00:01:02,110 --> 00:01:05,320 So let's begin with the moving left and how will I move left. 15 00:01:05,320 --> 00:01:12,250 I will take the coordinates of Cacho and if they are X1 grid then zero then I will move my catcher for 16 00:01:12,250 --> 00:01:13,590 a certain distance. 17 00:01:13,840 --> 00:01:16,350 And again this motion is not the actual motion. 18 00:01:16,450 --> 00:01:18,810 It is just changing of position. 19 00:01:18,820 --> 00:01:33,070 So I have here X1 y one and x2 y2 and these will be CDO coordinates of catcher. 20 00:01:34,090 --> 00:01:38,530 And now if my X1 is greater than 0. 21 00:01:38,770 --> 00:01:40,970 Only then I can move in left direction. 22 00:01:41,200 --> 00:01:46,160 Then how we can change all the coordinates so for certain figure at a time. 23 00:01:46,270 --> 00:01:47,340 Just see Don't move 24 00:01:51,090 --> 00:01:57,390 by using this one we can move our program of a particular figure in any direction. 25 00:01:57,390 --> 00:02:00,990 So that's just changing its actual position with the new coordinates. 26 00:02:01,590 --> 00:02:08,830 So here what we want to move catcher so catcher and then 0. 27 00:02:09,690 --> 00:02:16,610 Sorry this is moving in left direction when wanting to show you like when we are moving the eggs we 28 00:02:16,610 --> 00:02:24,110 have taken zero to 10 and the position is actually spacing from zero to certain 10 pixels but here on 29 00:02:24,110 --> 00:02:27,330 this schedule I'm moving right and left. 30 00:02:27,470 --> 00:02:30,360 So the distance I'm going to take here is 20. 31 00:02:30,650 --> 00:02:34,110 But wanting to focus man I'm moving in the right direction. 32 00:02:34,460 --> 00:02:38,680 I will take this one as a positive 20 because X is increasing in this way. 33 00:02:39,350 --> 00:02:45,500 But when I take this one in negative I have to take minus 20 because that is actually a negative motion 34 00:02:45,500 --> 00:02:48,810 if we consider this one the center of our catcher. 35 00:02:50,010 --> 00:02:57,300 So here we need to pass minus 20 to zero because we are not going from zero to quantify yet actually 36 00:02:57,300 --> 00:03:01,260 coming back to zero from minus 20. 37 00:03:01,470 --> 00:03:10,320 So this is about the left direction motion for the light just copy this one base ditch him and change 38 00:03:10,320 --> 00:03:15,820 the condition whenever x2 is less than the canvas fit. 39 00:03:16,100 --> 00:03:20,510 So here we have endless food living in that condition. 40 00:03:20,510 --> 00:03:24,470 A positive 20 degree motion is going to be set in motion. 41 00:03:24,680 --> 00:03:27,140 They will go with left and right. 42 00:03:27,140 --> 00:03:29,220 Now we have defined all the functions. 43 00:03:29,270 --> 00:03:31,820 The question here is what now. 44 00:03:31,820 --> 00:03:36,830 So first of all we will pack the keys so that we can have the catch motion. 45 00:03:36,830 --> 00:03:39,040 Then we will work on the rest. 46 00:03:39,070 --> 00:03:45,030 Now this is a little different from the total graphics there we have used on keys. 47 00:03:45,250 --> 00:03:49,420 Here we have a different metal bind. 48 00:03:49,570 --> 00:03:54,360 So here we will use the bind metal to bind the keys with dysfunctions. 49 00:03:54,490 --> 00:03:56,850 So how we will do that one just see what bind. 50 00:03:57,160 --> 00:04:02,860 And the same like the old keys first provide the key and then provide the function. 51 00:04:03,460 --> 00:04:07,870 But here you need to pass the key in these decades. 52 00:04:07,910 --> 00:04:10,540 This is actually greater than and less than symbols. 53 00:04:11,170 --> 00:04:16,960 So this one and inside this one just left for left key with El capital there. 54 00:04:17,380 --> 00:04:25,700 So make sure all is capital then function move left tibial for right. 55 00:04:25,750 --> 00:04:31,650 Just seed or bind again these and their bus right. 56 00:04:31,770 --> 00:04:40,260 Maybe you and the function here will be more undisclosed right now for making sure that the Yankees 57 00:04:40,270 --> 00:04:41,080 are pressed. 58 00:04:41,080 --> 00:04:48,780 We also need to add one more method here that is seed or focus set so focus under so say. 59 00:04:48,940 --> 00:04:53,260 So this is what you need to add him at this point if you run your program. 60 00:04:54,340 --> 00:04:57,630 The data we have one to be Y. 61 00:04:57,640 --> 00:04:58,110 There we go. 62 00:04:59,050 --> 00:05:00,530 So here we have the catcher. 63 00:05:00,550 --> 00:05:04,570 And there we have the motion working perfectly fine. 64 00:05:04,900 --> 00:05:13,280 So disciplined right and got stopped when the extra is created and David and Ed reshape the left also. 65 00:05:13,370 --> 00:05:14,360 There we go. 66 00:05:14,420 --> 00:05:16,520 So we have the perfect motion on both sides. 67 00:05:19,110 --> 00:05:24,720 Also this is going a little out of the window because we do not have actually the correct values for 68 00:05:24,720 --> 00:05:25,450 the catcher. 69 00:05:25,470 --> 00:05:28,040 We have something left from the original. 70 00:05:28,140 --> 00:05:33,270 So David go with this one in the next video we will just combine all these functions so they can work 71 00:05:33,270 --> 00:05:33,690 together. 72 00:05:34,530 --> 00:05:38,130 So thanks for watching this about the keys and I was in the next video.