background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Движущаяся платформа и взаимодействие с ней / Moveing platform - Unity легко"

input logo icon
Video tags
|

Video tags

обучение
уроки
с нуля
tutorial
lesson
2d
3d
юнити
unity
game
dev
develop
игра
разработка
программирование
си шарп
код
скрипт
programming
c#
code
script
platform
moveing
платформа
движение
графика
дизайн
graphical
design
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:05
good day
00:00:07
in the previous videos, I demonstrated how
00:00:09
to implement the ability to jump onto
00:00:12
platforms on one side and land
00:00:14
on it on the other, for example, so that when we are
00:00:16
with another from below, the platform would not be visible,
00:00:18
but when we land on top it would be
00:00:21
visible, and I also demonstrated how to
00:00:23
do so that when you press a key
00:00:26
we can jump through this platform
00:00:29
to the platform below I would like to continue a
00:00:31
little this topic turned out to be
00:00:33
quite interesting for me at
00:00:35
least and I would like to edit to implement a
00:00:38
moving platform it would seem that all this is
00:00:43
easy to make the
00:00:46
object move through translate and yes everything is cool with the
00:00:49
platform moving, but if you do this
00:00:52
right away it’s a little spoiled the character
00:00:55
will not move with the platform
00:00:58
the character will remain in place and yes it’s
00:01:01
cool if the mechanics of your game
00:01:03
imply this but what if I wanted to
00:01:05
jump onto the platform
00:01:07
without clicking anything and move with the
00:01:09
platform here This is what I’m going
00:01:11
to demonstrate right now, not like this. Initially,
00:01:15
in my project there is already a moving character,
00:01:17
there are several platforms, this is exactly the
00:01:19
project from the previous video where I
00:01:22
did jumping on platforms, but the
00:01:25
main thing here is not that the character
00:01:27
is moving and so that he can jump on
00:01:30
platform, I have regular jumps,
00:01:32
I can jump using the down button, but
00:01:34
your project has enough to have something to
00:01:38
jump on and someone to jump on, everything
00:01:41
in order to move the platform, I will
00:01:44
create a separate script which I will
00:01:46
logically call moving platform, I will immediately launch
00:01:50
this script start in this case I won’t
00:01:53
need it, but I’ll create several
00:01:54
variables, the first float der x, using
00:01:58
this variable, I’ll indicate while in the class I
00:02:01
need to move float speed, I
00:02:03
’ll write it, for example, equal to 3, this is the
00:02:06
speed at which it will be possible to move
00:02:09
the platform below the bull moving wright to
00:02:13
work again using this With the variable I will
00:02:16
read the information which side the
00:02:19
platform currently needs to move to the
00:02:21
right or left to get there, you need to create the
00:02:25
conditions that transform them. position .
00:02:29
x is greater than 4f in this case 4f is the
00:02:34
x coordinate,
00:02:36
that is, it is not just a displacement from the
00:02:39
current position of the platform, but this is the
00:02:41
global value 4,
00:02:43
that is, it cannot move more
00:02:46
than 4 x,
00:02:47
so if my platform along the x axis
00:02:51
becomes greater than 4 f -that moving right
00:02:55
equals fall, that is, it stops
00:02:57
moving to the right to a positive
00:02:59
value and starts moving to the left below I
00:03:03
will indicate that else if also transform .
00:03:06
position .
00:03:08
x is less than -4 ef-s it is logical if I reached
00:03:12
-4 this is on the left then the moving right should again
00:03:17
become a corpse, that is, a shift to the right, this
00:03:22
block condition simply indicates
00:03:24
in which direction and under what conditions it is
00:03:26
necessary to move, that is, the range from - 4 f
00:03:30
yes plus 4 from the whole, but it would be necessary to force
00:03:34
this platform to move, not just
00:03:36
specify the conditions that it should
00:03:38
move, so below is the account of the conditions of their
00:03:41
moving right, if you just write in
00:03:44
parentheses moving right, this means
00:03:46
initially that it is a corpse
00:03:47
to transform . position, that is, the movement of
00:03:50
our object is equal to vector2
00:03:55
in transform brackets. positions.
00:03:58
x for now I’ll show you the general idea and then we’ll
00:04:01
fill everything in, we’ll analyze it, delta time multiplied by
00:04:04
time, transform . position .
00:04:10
y this line indicates that we should move along the X,
00:04:14
but not along the Y, but we have
00:04:18
n’t yet indicated at what speed now
00:04:19
now we’ll do all this,
00:04:21
but in hp and it’s still the same line, but now
00:04:25
the difference should only be in the speed with
00:04:29
how can I indicate what is moving to the right or
00:04:31
to the left, the speed parameters
00:04:34
were indicated at the top,
00:04:35
so in the first case I will specify
00:04:37
transform . positions
00:04:39
x plus sleeps delta time multiplied by
00:04:45
time I can correct the movement in a
00:04:48
positive direction and in the second case
00:04:51
I will indicate that my transform position
00:04:54
should be minus
00:04:56
sleeps that is, it moves to the left multiplied
00:04:59
by time delta time
00:05:00
everything now the platform is moving but
00:05:05
we return to unity attach the script to the
00:05:08
platform which should move but
00:05:13
what problem will we face with what I
00:05:15
said at the beginning if I jump onto
00:05:18
the platform and don’t move the character the
00:05:21
character stands still and the platform
00:05:23
moves yes it’s cool and interesting it’s
00:05:25
possible in certain mechanics with you
00:05:28
can do it so but I would like that
00:05:31
the character moved along with this
00:05:33
platform, okay, yes, let’s do it for this purpose,
00:05:37
I’ll go back to the studio and switch
00:05:40
to the playercontroller script
00:05:42
and this is already done directly by
00:05:43
the character, here I’ll indicate that void ark lies
00:05:51
enter 2d, that is, when I touch a
00:05:56
certain element with college 2d in
00:05:59
parentheses to we lie by itself, this is the structure itself
00:06:03
iv conditions inside the brackets kalyazin.
00:06:08
game of jack.
00:06:09
name. and kvs in parentheses
00:06:12
and quotes I will indicate tools, that is, it is
00:06:16
indicated here that if I came into contact with this
00:06:19
college
00:06:20
with game objects, that is, with a name object
00:06:23
that has a specific name and coles
00:06:26
and this name is equal to this name in brackets of the
00:06:29
name tools, you can do it through
00:06:32
like this In this case, I
00:06:33
do it through the name, if the object is named
00:06:37
as times, then the following dis should occur
00:06:39
.
00:06:42
transform. parent here means
00:06:46
that this object, that is, our character,
00:06:48
well, because this method hangs on it.
00:06:52
transform that is, its transformation of
00:06:55
position or rotation. parent must
00:06:59
be related must become parent
00:07:02
equals kalyazin. transform that is,
00:07:06
we come into contact with the
00:07:07
object, the jerk itself, the object itself becomes
00:07:10
the main thing for him,
00:07:12
that is, the main thing for us, and when
00:07:14
this main object moves, we, as a
00:07:17
subordinate object, in this case
00:07:19
should move along with this
00:07:20
platform, it’s
00:07:22
also logical, yes, create will show white
00:07:26
he Kalyazin exe 2d
00:07:29
transfer all these lines and perhaps
00:07:34
replace a little here by indicating what is
00:07:37
here. transform. before equals well,
00:07:40
that is, there should no longer be any parental connection,
00:07:43
and if I launch it before the protest,
00:07:48
when I jump onto the platform, now I don’t
00:07:50
need to press anything on the keyboard,
00:07:52
my character starts moving behind the
00:07:55
platform, and of course I can move along this platform
00:07:58
without any problems everyone
00:08:02
perfectly
00:08:04
implemented what I wanted. If you
00:08:07
liked the video and want to treat
00:08:08
me to coffee, the link to my patreon
00:08:10
will be in the description and also like,
00:08:13
subscribe to the channel and see you in the
00:08:15
next video

Description:

В этом видео, я покажу как сделать движущуюся платформу таким образом, чтоб когда персонаж становился на нее, то он начал двигаться вместе с ней. Сделаю я это при помощи parent связи в Unity, https://www.patreon.com/graphicaldesignua - мой патреон для поддержки) https://t.me/joinchat/K3HCV0nUjP4X7kCvM346gw - телеграм канал https://unity.com/ru - ссылка на Unity

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Движущаяся платформа и взаимодействие с ней / Moveing platform - Unity легко" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Движущаяся платформа и взаимодействие с ней / Moveing platform - Unity легко" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Движущаяся платформа и взаимодействие с ней / Moveing platform - Unity легко" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Движущаяся платформа и взаимодействие с ней / Moveing platform - Unity легко" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Движущаяся платформа и взаимодействие с ней / Moveing platform - Unity легко"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Движущаяся платформа и взаимодействие с ней / Moveing platform - Unity легко"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.