Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:06,656 --> 00:00:12,800
Search do a little bit of code clean up really quick clean
2
00:00:13,056 --> 00:00:13,568
Yes
3
00:00:13,824 --> 00:00:14,592
Ian
4
00:00:14,848 --> 00:00:18,688
Just remove that debug we don't need anymore we also don't need
5
00:00:19,456 --> 00:00:22,272
Is debug here either so it's a bit out
6
00:00:23,296 --> 00:00:28,416
And what we're going to do is really going to talk about what's cold conditions
7
00:00:28,928 --> 00:00:31,232
Conditions are basically how are you
8
00:00:31,744 --> 00:00:34,304
Test whether something is true or false
9
00:00:34,816 --> 00:00:37,120
Mmm do something based on
10
00:00:37,632 --> 00:00:39,424
If it's true or false
11
00:00:39,680 --> 00:00:45,568
Kind of makes very little sense when I say it like that but what if I write something like this
12
00:00:46,336 --> 00:00:47,360
If
13
00:00:47,616 --> 00:00:49,408
I'm touching
14
00:00:49,664 --> 00:00:52,224
The right of the screen
15
00:00:52,480 --> 00:00:54,016
Stop moving
16
00:00:55,552 --> 00:00:56,576
NN
17
00:00:56,832 --> 00:01:00,781
All of this if I'm touching the left of the screen
18
00:01:00,783 --> 00:01:03,259
Subtitled by
-♪ online-courses.club ♪-
We compress knowledge for you!
https://t.me/joinchat/ailxpXoW3JVjYzQ1
19
00:01:03,260 --> 00:01:03,744
Start moving
20
00:01:04,256 --> 00:01:07,328
What is this mean what is your boundaries so if I go to my
21
00:01:07,840 --> 00:01:08,864
Unity editor
22
00:01:09,120 --> 00:01:09,888
If
23
00:01:10,656 --> 00:01:11,680
I'm over here
24
00:01:11,936 --> 00:01:13,472
I want to stop moving
25
00:01:13,728 --> 00:01:15,008
So that I can't go
26
00:01:15,264 --> 00:01:16,032
Past
27
00:01:16,288 --> 00:01:17,312
The left side
28
00:01:18,592 --> 00:01:21,152
I meant if I'm touching the right side of the screen
29
00:01:21,664 --> 00:01:23,456
I can't move to the right
30
00:01:24,224 --> 00:01:26,272
Well what are those actual values
31
00:01:27,040 --> 00:01:28,576
Mohamedou left here
32
00:01:28,832 --> 00:01:30,112
You know this that
33
00:01:30,368 --> 00:01:32,928
I'm at -8.35
34
00:01:33,440 --> 00:01:35,488
I'm at the right over here
35
00:01:36,256 --> 00:01:38,560
I'm a positive 8.35
36
00:01:39,328 --> 00:01:41,120
Factors values can be equal
37
00:01:41,632 --> 00:01:42,656
So
38
00:01:43,424 --> 00:01:45,216
Can we write this out on a script
39
00:01:46,752 --> 00:01:48,288
Basically
40
00:01:48,800 --> 00:01:50,848
Not actually putting fantasies
41
00:01:51,872 --> 00:01:54,176
The ratio of the screen is 8.35
42
00:01:55,200 --> 00:01:58,784
Is the left side of screen is -8.35
43
00:01:59,040 --> 00:02:00,832
The way we write this is
44
00:02:01,088 --> 00:02:03,648
If princesses
45
00:02:04,672 --> 00:02:05,952
Transform
46
00:02:06,208 --> 00:02:08,256
That position
47
00:02:08,512 --> 00:02:10,560
X is
48
00:02:11,328 --> 00:02:14,400
Greater than 8.35
49
00:02:15,424 --> 00:02:21,568
Then we want to set our transformed value to be 8.35 so we're going to do is Transformed
50
00:02:22,080 --> 00:02:23,104
Position
51
00:02:23,360 --> 00:02:27,456
And you would assume it that x = 8.35
52
00:02:28,224 --> 00:02:32,576
Well you can actually do this in c-sharp you can definitely do this kind of
53
00:02:32,832 --> 00:02:37,184
Code in Javascript but the X value of position
54
00:02:37,696 --> 00:02:43,840
Is what card a read-only value you can actually said it you can only get it
55
00:02:44,352 --> 00:02:47,424
But you can set the actual vector
56
00:02:47,680 --> 00:02:49,984
So new vector3
57
00:02:51,264 --> 00:02:55,616
8.35 fnn transform that position
58
00:02:55,872 --> 00:02:57,152
Why
59
00:02:57,408 --> 00:02:59,712
And explain this is just a second guys
60
00:02:59,968 --> 00:03:01,504
Transform that position
61
00:03:01,760 --> 00:03:03,552
Darkzy
62
00:03:03,808 --> 00:03:04,320
Ok
63
00:03:04,576 --> 00:03:06,624
So what this means is
64
00:03:06,880 --> 00:03:13,024
Is my positional value of x is greater than 8.35 AKA
65
00:03:13,280 --> 00:03:15,328
Find past the right side of the screen
66
00:03:15,584 --> 00:03:20,704
Immediately set my transformed up position to a new vector of
67
00:03:21,984 --> 00:03:23,264
8.35
68
00:03:24,288 --> 00:03:25,568
And the current
69
00:03:25,824 --> 00:03:30,176
My position so wherever I am on the y-axis just maintain that
70
00:03:30,432 --> 00:03:33,248
And the same is true with the z-axis as well
71
00:03:35,040 --> 00:03:38,368
Search test this outlet test out the right boundary
72
00:03:39,648 --> 00:03:40,672
What's it play here
73
00:03:42,208 --> 00:03:44,512
And don't worry sometimes you gonna get warning
74
00:03:44,768 --> 00:03:46,304
Messages that's ok
75
00:03:47,584 --> 00:03:48,352
Seizure
76
00:03:50,144 --> 00:03:50,912
Works great
77
00:03:52,192 --> 00:03:54,496
I can't move past the right side of the screen
78
00:03:55,520 --> 00:03:57,824
Mum and I get 8.35 notes
79
00:03:58,336 --> 00:04:00,128
Selling it 8.35
80
00:04:00,384 --> 00:04:06,528
And you can actually see it but it's constantly over and over and over and over and over and over again setting at 8
81
00:04:06,784 --> 00:04:07,296
335
82
00:04:07,552 --> 00:04:09,856
Again because the inside of the update loop
83
00:04:10,112 --> 00:04:15,488
That can only do it once it's going to do it over and over and over again you just can't see it with your eye
84
00:04:16,768 --> 00:04:19,071
I thought to do the left side as well
85
00:04:19,583 --> 00:04:20,863
Are we going to do is
86
00:04:21,375 --> 00:04:21,887
Well
87
00:04:22,399 --> 00:04:24,959
When we just copy this paste it down here
88
00:04:25,983 --> 00:04:28,031
Now you want to do it flip it
89
00:04:29,055 --> 00:04:32,639
So if transformed opposition that x is smaller than
90
00:04:33,151 --> 00:04:34,175
Negative
91
00:04:34,687 --> 00:04:35,967
8.35
92
00:04:36,223 --> 00:04:40,575
Immediately set it to -8.35 f
93
00:04:40,831 --> 00:04:42,623
Resetting the X value
94
00:04:42,879 --> 00:04:46,207
The Wi-Fi is the same disease the same as well
95
00:04:46,463 --> 00:04:47,743
Unity
96
00:04:48,255 --> 00:04:49,279
Can you play
97
00:04:53,119 --> 00:04:53,887
Ok
98
00:04:56,447 --> 00:04:57,215
What's great
99
00:04:57,471 --> 00:04:58,495
Can't move to the right
100
00:04:59,007 --> 00:05:00,031
Pass the screen
101
00:05:00,543 --> 00:05:02,335
10 or the left
102
00:05:02,591 --> 00:05:03,871
That's exactly what we were
103
00:05:04,639 --> 00:05:07,199
Let's go ahead and do this for the why buy you as well
104
00:05:07,455 --> 00:05:09,759
What let's move up and see what the why
105
00:05:10,015 --> 00:05:12,319
Top value is here
106
00:05:13,087 --> 00:05:15,391
Looks like it's 4.47
107
00:05:16,159 --> 00:05:16,927
Ok
108
00:05:17,695 --> 00:05:20,255
Probably the same for the bottom
109
00:05:22,559 --> 00:05:23,327
Except Megan
110
00:05:23,583 --> 00:05:26,911
Just about to -4.47
111
00:05:27,679 --> 00:05:30,239
Let's just make it a clean 4.45
112
00:05:30,751 --> 00:05:31,263
So
113
00:05:33,567 --> 00:05:35,359
Let's just copy both of these
114
00:05:35,615 --> 00:05:36,895
Pasting down here
115
00:05:37,919 --> 00:05:40,991
You noticed that you're going to start doing this more and more and more
116
00:05:41,247 --> 00:05:44,063
When you create a new game just copying and pasting code
117
00:05:44,319 --> 00:05:46,623
So what was it it was 4 point
118
00:05:47,135 --> 00:05:49,695
64.5 nice and clean
119
00:05:49,951 --> 00:05:51,231
And then negative
120
00:05:51,487 --> 00:05:52,767
4.45
121
00:05:54,303 --> 00:05:55,327
4.5 m
122
00:05:55,839 --> 00:06:00,703
If I'm touching the bottom of the screen and top of the screen
123
00:06:01,215 --> 00:06:04,799
Start moving in again guys these comments are only here for us
124
00:06:05,055 --> 00:06:08,639
The night for the code I don't need these for the code it just help me know
125
00:06:09,151 --> 00:06:10,431
What is section
126
00:06:10,943 --> 00:06:11,711
Is doing
127
00:06:12,991 --> 00:06:19,135
So let's just focus on this really quick don't worry about this in fact I'm gonna just delete it and so you don't panic
128
00:06:19,391 --> 00:06:23,231
Because I know the one I was learning how to code I would pay it cos it's so much on screen
129
00:06:23,999 --> 00:06:30,143
But if I'm touching the top of the screen which is 4.5 Stop Moving so if transformed at position
130
00:06:30,655 --> 00:06:31,423
Why
131
00:06:31,935 --> 00:06:33,983
Get greater than
132
00:06:34,239 --> 00:06:35,263
4.5
133
00:06:36,543 --> 00:06:42,687
Transform deposition equal and secure getting there we need to make sure we use a princess is there there we go
134
00:06:42,943 --> 00:06:49,087
Then my trains from that position is going to equal the new vector now remember this is the X value
135
00:06:49,855 --> 00:06:52,415
This is the Y value in this is the Z value
136
00:06:53,183 --> 00:06:55,487
So we're setting the transformed position
137
00:06:55,743 --> 00:06:57,279
To a y value
138
00:06:58,303 --> 00:06:59,071
For this
139
00:07:00,351 --> 00:07:02,911
Condition that tested with touching the top of the screen
140
00:07:03,423 --> 00:07:07,007
So you just want this to be the same transformed at position
141
00:07:07,263 --> 00:07:08,031
Directs
142
00:07:08,799 --> 00:07:14,943
So you're not really changing anything there were just saying set the position of the X value to its
143
00:07:15,199 --> 00:07:17,247
So nothing's changing there
144
00:07:17,759 --> 00:07:21,855
We do want to change the Y value which would be 4.5
145
00:07:22,879 --> 00:07:24,415
Save that
146
00:07:24,927 --> 00:07:28,767
Because I know this is going to work we can kill two birds with one stone
147
00:07:29,023 --> 00:07:30,303
Set this to negative
148
00:07:30,815 --> 00:07:31,583
4.5
149
00:07:32,095 --> 00:07:35,679
If I'm touching the bottom of the screen which is
150
00:07:35,935 --> 00:07:38,751
Smaller than -4.5
151
00:07:39,775 --> 00:07:42,335
Senator -4.5
152
00:07:42,591 --> 00:07:43,615
Flipping the signs
153
00:07:44,383 --> 00:07:47,967
For about the condition and also the plug how are you
154
00:07:48,223 --> 00:07:52,319
No display of the red squiggly that's just because we need an F&F here
155
00:07:53,599 --> 00:07:54,367
It save
156
00:07:54,623 --> 00:07:55,647
Jumping unity
157
00:07:56,927 --> 00:07:57,695
Hit play
158
00:07:58,975 --> 00:08:01,791
And we should have everything working properly
159
00:08:02,303 --> 00:08:04,863
Looks grey so I can't get out of this box
160
00:08:05,119 --> 00:08:07,423
And that because we are using the if statement
161
00:08:07,679 --> 00:08:08,959
Which is a condition
162
00:08:11,263 --> 00:08:12,543
Alright works great
10931
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.