{"id":322683,"date":"2021-05-06T15:00:12","date_gmt":"2021-05-06T15:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=322683"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=322683","title":{"rendered":"\u0422\u0438\u0440. \u0421\u0442\u0440\u0435\u043b\u044c\u0431\u0430 \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u0430\u043c\u0438 \u043d\u0430 Unity 3D"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h2>\u0423\u0447\u0435\u0431\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0434\u043b\u044f \u0448\u043a\u043e\u043b\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0427\u0430\u0441\u0442\u044c&nbsp;17<\/h2>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0443\u0440\u043e\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:<\/summary>\n<div class=\"spoiler__content\">\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/535916\/\" rel=\"noopener noreferrer nofollow\">Spaceship<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/536204\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043c\u0438\u043d\u043e<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/536658\/\" rel=\"noopener noreferrer nofollow\">Flappy Bird<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/537580\/\" rel=\"noopener noreferrer nofollow\">\u0413\u0440\u0430\u0432\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/537586\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/538874\/\" rel=\"noopener noreferrer nofollow\">\u0414\u0435\u0440\u0435\u0432\u044c\u044f (\u043f\u043b\u0430\u0433\u0438\u043d SpeedTree)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/538878\/\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043c\u0430 \u0432 SketchUp<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/538910\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043c \u0432 \u043b\u0435\u0441\u0443<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/540146\/\" rel=\"noopener noreferrer nofollow\">\u042d\u0444\u0444\u0435\u043a\u0442 \u0434\u043e\u0436\u0434\u044f. \u0427\u0430\u0441\u0442\u0438\u0446\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/540186\/\" rel=\"noopener noreferrer nofollow\">\u0411\u0438\u043b\u044c\u044f\u0440\u0434<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/540274\/\" rel=\"noopener noreferrer nofollow\">\u0416\u0438\u0434\u043a\u0438\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/541868\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0438\u043a\u0438 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Event System<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/551516\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440 \u043d\u0430 Unity 3D<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/552834\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0443\u0434\u043d\u043e \u043d\u0430 \u0432\u043e\u0437\u0434\u0443\u0448\u043d\u043e\u0439 \u043f\u043e\u0434\u0443\u0448\u043a\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/552840\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0433\u0434\u043e\u043b\u043b\u044b \u043d\u0430 Unity 3D<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/553420\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u044b. \u0411\u0430\u0441\u043a\u0435\u0442\u0431\u043e\u043b \u043d\u0430 Unity 3D<\/a><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b: <\/p>\n<p>&#8212; \u0441 \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u0430\u043c\u0438 \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438;<br \/>&#8212; \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432;<br \/>&#8212; \u0441 AudioSource \u0438 \u0441 Rigidbody \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434;<br \/>&#8212; \u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430, \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043d\u0430 \u0438\u0433\u0440\u043e\u043a\u0430 (\u0437\u0432\u0443\u043a, \u0441\u0432\u0435\u0442 \u0438 \u0441\u0432\u0435\u0447\u0435\u043d\u0438\u0435, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0438 \u0441\u043b\u0435\u0434 \u043e\u0442 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430);<br \/>&#8212; \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0444\u0430\u0431\u043e\u0432.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0442\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u044b \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c, \u0438 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0443\u0447\u0435\u043d\u0438\u043a\u0430\u043c\u0438, \u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043c\u0435\u0441\u0442\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c mecanim-\u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<h2>\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 <a href=\"https:\/\/disk.yandex.ru\/d\/djqB8cpF_jnAYw?w=1\" rel=\"noopener noreferrer nofollow\">\u0430\u0441\u0441\u0435\u0442<\/a>.<br \/>\u041f\u043e\u043c\u0438\u043c\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0430\u043a\u0435\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0434\u0435\u043a\u0430\u043b\u0435\u0439. \u0415\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u043a\u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0443\u0440\u043e\u043a\u0430 \u0440\u0430\u0437\u0431\u0438\u0442 \u043d\u0430 2 \u0447\u0430\u0441\u0442\u0438 &#8212; \u0442\u0438\u0440 \u0438 \u0433\u0440\u0430\u043d\u0430\u0442\u044b.<\/p>\n<h2>\u0422\u0438\u0440<\/h2>\n<p>\u0422\u0438\u0440 &#8212; \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0434\u0435\u0442\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u0430\u043c\u0438. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f, \u0431\u044b\u043b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0430\u0441\u0441\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0433\u0440\u0443\u043f\u043f\u0435 \u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0441\u0441\u0435\u0442, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043c\u0438\u0448\u0435\u043d\u0438 \u0438 \u0435\u0451 \u043f\u0440\u0435\u0444\u0430\u0431\u0430.<br \/>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0443\u0440\u043e\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0435\u0439\u043a\u0430\u0441\u0442 \u0438 \u0442\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0438\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8da\/f80\/4a9\/8daf804a925b1eff5ce7b9147a969ca4.png\" width=\"1034\" height=\"754\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 DecalShooter, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u0435\u043a\u0430\u043b\u0438, \u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0435\u0439\u043a\u0430\u0441\u0442. \u0412 \u043d\u0451\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u0434 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043c\u0438\u0448\u0435\u043d\u044c\u044e.<br \/>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u0443 \u043c\u0438\u0448\u0435\u043d\u044c. \u0415\u044e \u0441\u043b\u0443\u0436\u0438\u0442 \u0446\u0438\u043b\u0438\u043d\u0434\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043f\u043e Y \u0434\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u043b\u0430\u0442\u0438\u043d\u044b, \u0443\u0434\u0430\u043b\u0438\u0442\u044c CapsuleCollider \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c MeshCollider \u0441 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 Convex. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430 \u0446\u0438\u043b\u0438\u043d\u0434\u0440 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043c\u0438\u0448\u0435\u043d\u0438, \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043b\u0438\u043d\u0434\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f point light, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u043c\u0438\u0448\u0435\u043d\u044c, \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 AudioSource \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430, \u0430 \u043d\u0430 \u0441\u0430\u043c \u0446\u0438\u043b\u0438\u043d\u0434\u0440 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f Rigidbody \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0442\u0438\u043f\u0430 Continius Dynamic \u0438 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 isKinematik. \u0423 AudioSource \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0431\u0440\u0430\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 PlayOnAwake \u0438 \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0437\u0432\u0443\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432 \u043c\u0438\u0448\u0435\u043d\u044c.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Target, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043d\u0430\u0448\u0443 \u043c\u0438\u0448\u0435\u043d\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/580\/9c1\/56d\/5809c156d0f98e35d7ff993d101069da.png\" width=\"1030\" height=\"617\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f75\/18a\/b9e\/f7518ab9e007a56cbcd510cedc6e7af8.png\" width=\"496\" height=\"800\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0438\u0448\u0435\u043d\u044c \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u0435\u0444\u0430\u0431, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0438\u0448\u0435\u043d\u0438 \u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043a\u043e\u0434\u0443 \u043c\u0438\u0448\u0435\u043d\u0438.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine;   public class Target : MonoBehaviour {     public GameObject light;     public Rigidbody rig;     public AudioSource src;       bool enabled = true;       \/\/ Use this for initialization      void Start() {         rig = GetComponent&lt;Rigidbody&gt;();         src = GetComponent&lt;AudioSource&gt;();      }       \/\/ Update is called once per frame      void Update() {       }       public void shoot() {         if (!enabled) {            return;         }           rig.isKinematic = false;          light.SetActive(false);          src.Play();           enabled = false;     }   } <\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043c\u0438\u0448\u0435\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434&nbsp;\u200bshoot,\u200b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u043c\u0438\u0448\u0435\u043d\u0438. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 DecalShooter \u043f\u043e\u043f\u0430\u043b\u0438 \u043b\u0438 \u043c\u044b \u0432 \u043c\u0438\u0448\u0435\u043d\u044c \u0438 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430&nbsp;\u200bshoot. \u0412 \u0440\u0435\u0439\u043a\u0430\u0441\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cs\">   if (Input.GetKeyDown(KeyCode.Mouse0)) {             time = 0.3f;              ShootSource.Play();              anim.Play(\"fire\");              Muzzleflash.SetActive(true);             \/\/ \u0421\u0430\u043c\u0430 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0430              RaycastHit hitInfo;             Vector3 fwd = transform.TransformDirection(Vector3.forward);                           if (Physics.Raycast(transform.position, fwd, out hitInfo, 100f)) {                 GameObject go = Instantiate(                     DecalPrefab,                     hitInfo.point,                      Quaternion.LookRotation(                         Vector3.Slerp(-hitInfo.normal, fwd, normalization)                      )                 ) as GameObject;                 go.GetComponent&lt;DecalUpdater&gt;().UpdateDecalTo(                     hitInfo.collider.gameObject,                      true                 );                 Vector3 explosionPos = hitInfo.point;                 Target trg = hitInfo.collider.GetComponent&lt;Target&gt;();                                  if (trg) {                     trg.shoot();                 }                                  Rigidbody rb = hitInfo.collider.GetComponent&lt;Rigidbody&gt;();                                  if (rb != null) {                     rb.AddForceAtPosition(fwd * power, hitInfo.point, ForceMode.Impulse);                     Debug.Log(\"rb!\");                 }              }             \/\/ \u0421\u0430\u043c\u0430 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0430          }<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 hitInfo \u0438, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0443\u0434\u0430\u0451\u0442\u0441\u044f, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434&nbsp;\u200bshoot.\u200b \u041c\u0438\u0448\u0435\u043d\u044c \u043f\u0430\u0434\u0430\u0435\u0442, \u0441\u0432\u0435\u0442 \u043e\u0442 \u043c\u0438\u0448\u0435\u043d\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f, \u0437\u0432\u0443\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f. \u0414\u0430\u043b\u0435\u0435, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u0448\u0435\u043d\u044c \u043c\u0435\u043d\u044f\u043b\u0430 \u0446\u0432\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0438. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u0432 Target \u0441\u0442\u0440\u043e\u043a:<\/p>\n<pre><code class=\"cs\">light.SetActive(false);<\/code><\/pre>\n<p>\u043d\u0430<\/p>\n<pre><code class=\"cs\">light.GetComponent&lt;Light&gt;().color = Color.red;<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0432\u0435\u0442 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0413\u0440\u0430\u043d\u0430\u0442\u044b<\/h2>\n<p>\u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0443\u0440\u043e\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 &#8212; \u0434\u0430\u043b\u044c\u043d\u043e\u043c\u0435\u0440.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;   public class Lenght :  MonoBehaviour {     public Text Dalnost;     float rasstoyanie = 0; \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u0446\u0435\u043b\u0438       \/\/ Use this for initialization      void Start() {       }       \/\/ Update is called once per frame      void Update() {         RaycastHit hitInfo;                  if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitInfo, 200)) {             rasstoyanie = hitInfo.distance;             Dalnost.text = rasstoyanie.ToString();         }     } }<\/code><\/pre>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043a\u0438\u043d\u0435\u043c \u0432 FPScontroller\/FirstPersonCharacter. \u0412 Canvas \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0435\u043a\u0441\u0442, \u0437\u0430\u043a\u0438\u043d\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442.<br \/>\u0412 \u044d\u0442\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0440\u0435\u0439\u043a\u0430\u0441\u0442, \u0438 \u043d\u0430 \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c, \u043a\u0430\u043a \u0440\u0435\u0439\u043a\u0430\u0441\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043a\u0430\u043a \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<br \/>\u041f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u0430 \u043c\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0434\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/42b\/6f0\/bef\/42b6f0befff5610e5de9db2a8200f7a3.png\" width=\"1231\" height=\"646\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 &#8212; \u0431\u0440\u043e\u0441\u043e\u043a \u0433\u0440\u0430\u043d\u0430\u0442\u044b. \u041c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u0440\u0430\u043d\u0430\u0442\u0443 \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043e\u0442 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438 \u043f\u0440\u0438\u0434\u0430\u0451\u043c \u0435\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0432\u0437\u0433\u043b\u044f\u0434\u0430. \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0444\u0430\u0431\u0430 \u0433\u0440\u0430\u043d\u0430\u0442\u044b \u0438 \u043a\u043e\u0434 \u0431\u0440\u043e\u0441\u043a\u0430.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic;  using UnityEngine; using UnityEngine.UI;   public class Length :  MonoBehaviour {     public Text Dalnost;     float rasstoyanie = 0; \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u0446\u0435\u043b\u0438      public GameObject sharik;       \/\/ Use this for initialization     void Start() {       }       \/\/ Update is called once per frame      void Update() {         RaycastHit hitInfo;                   if(Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), outhitInfo, 200)) {             rasstoyanie = hitInfo.distance;              Dalnost.text = rasstoyanie.ToString ();             if(Input.GetKeyDown(KeyCode.Mouse1)) {                 GameObject go = Instantiate(                     sharik,                      transform.position + Vector3.Normalize(hitInfo.point - transform.position),                      transform.rotation                 );                 Rigidbody rig = go.GetComponent&lt;Rigidbody&gt;();                 rig.velocity = Vector3.Normalize(hitInfo.point - transform.position) * 10;             }          }     }  }<\/code><\/pre>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0436\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 &#8212; \u0437\u0430\u0447\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435? \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043f\u0440\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u043d\u0435\u0431\u043e \u0431\u0440\u043e\u0441\u043e\u043a \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0422.\u043a. \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0443\u0440\u043e\u043a\u0430 \u043a\u043e\u0434 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e, \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0443\u0447\u0430\u0441\u0442\u043a\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043b\u043e \u0437\u0430 \u0441\u0430\u043c\u043e\u0439 \u0433\u0440\u0430\u043d\u0430\u0442\u043e\u0439. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 Grenade.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine;   public class Grenade :  MonoBehaviour {     public Transform explosionPrefab;       void OnCollisionEnter(Collision collision) {         ContactPoint contact = collision.contacts[0];                  \/\/ Rotate the object so that the y-axis faces along the normal of the surface         Quaternion rot = Quaternion.FromToRotation(Vector3.up, contact.normal);         Vector3 pos = contact.point;          Instantiate(explosionPrefab, pos, rot);         Destroy(gameObject);     } }<\/code><\/pre>\n<p>\u0417\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u0433\u0440\u0430\u043d\u0430\u0442\u0443, \u043d\u0430 \u043c\u0435\u0448 Body \u0441\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043b\u043b\u0430\u0439\u0434\u0435\u0440\u0443 Convex, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0433\u0440\u0430\u043d\u0430\u0442\u0435 RIgidbody \u0438 \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u0433\u0440\u0430\u043d\u0430\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043f\u0440\u0435\u0444\u0430\u0431 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u043e \u0441\u0446\u0435\u043d\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9e2\/0fd\/154\/9e20fd1547aa27c1d8c16702b9fc0664.png\" width=\"1189\" height=\"620\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0438\u0441\u0438\u0442, \u043d\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0432\u0437\u0440\u044b\u0432\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/588\/f66\/d9b\/588f66d9bf651477ebfbcc94dbf1f0be.png\" width=\"839\" height=\"443\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u044d\u0444\u0444\u0435\u043a\u0442 \u0432\u0437\u0440\u044b\u0432\u0430. \u0412 \u043d\u0451\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0432\u0435\u0442 \u043e\u0442 \u0432\u0437\u0440\u044b\u0432\u0430, AudioSource \u0441 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 PlayOnAwake \u0438 \u0437\u0432\u0443\u043a\u043e\u043c \u0432\u0437\u0440\u044b\u0432\u0430, Spital Blend \u043d\u0430 90 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432 3\u0434 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0434\u0438\u0443\u0441 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430.<br \/>\u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u043b\u0451\u0442\u0430 Rigidbody \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442. \u0415\u0433\u043e \u043c\u044b \u043d\u0430\u0437\u043e\u0432\u0451\u043c Explosion:<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Explosion :  MonoBehaviour {     public float radius = 5.0f;     public float power = 10.0f;     public GameObject svet;      void Start() {         Destroy(svet, 0.1f);          Vector3 explosionPos = transform.position;         Collider[] colliders = Physics.OverlapSphere(explosionPos, radius);          foreach(Collider hit in colliders) {             Rigidbodyrb = hit.GetComponent&lt;Rigidbody&gt;();             if (rb != null) {                 rb.AddExplosionForce(power, explosionPos, radius, 3.0f);             }         }     } }<\/code><\/pre>\n<p>\u0415\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430 \u044d\u0444\u0444\u0435\u043a\u0442 \u0432\u0437\u0440\u044b\u0432\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0435\u0444\u0430\u0431.<br \/>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0444\u0430\u0431 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0433\u0440\u0430\u043d\u0430\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0437\u0440\u044b\u0432\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e25\/a4f\/1cf\/e25a4f1cf6ed5319b07158df0026322a.png\" width=\"1341\" height=\"685\"><figcaption><\/figcaption><\/figure>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f83\/e5e\/b8f\/f83e5eb8f92316b38dfbd19cdcb28bc9.png\" width=\"1343\" height=\"662\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/556176\/\"> https:\/\/habr.com\/ru\/post\/556176\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h2>\u0423\u0447\u0435\u0431\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0434\u043b\u044f \u0448\u043a\u043e\u043b\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0427\u0430\u0441\u0442\u044c&nbsp;17<\/h2>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0443\u0440\u043e\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:<\/summary>\n<div class=\"spoiler__content\">\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/535916\/\" rel=\"noopener noreferrer nofollow\">Spaceship<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/536204\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043c\u0438\u043d\u043e<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/536658\/\" rel=\"noopener noreferrer nofollow\">Flappy Bird<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/537580\/\" rel=\"noopener noreferrer nofollow\">\u0413\u0440\u0430\u0432\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/537586\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/538874\/\" rel=\"noopener noreferrer nofollow\">\u0414\u0435\u0440\u0435\u0432\u044c\u044f (\u043f\u043b\u0430\u0433\u0438\u043d SpeedTree)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/538878\/\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043c\u0430 \u0432 SketchUp<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/538910\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043c \u0432 \u043b\u0435\u0441\u0443<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/540146\/\" rel=\"noopener noreferrer nofollow\">\u042d\u0444\u0444\u0435\u043a\u0442 \u0434\u043e\u0436\u0434\u044f. \u0427\u0430\u0441\u0442\u0438\u0446\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/540186\/\" rel=\"noopener noreferrer nofollow\">\u0411\u0438\u043b\u044c\u044f\u0440\u0434<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/540274\/\" rel=\"noopener noreferrer nofollow\">\u0416\u0438\u0434\u043a\u0438\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/541868\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0438\u043a\u0438 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Event System<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/551516\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440 \u043d\u0430 Unity 3D<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/552834\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0443\u0434\u043d\u043e \u043d\u0430 \u0432\u043e\u0437\u0434\u0443\u0448\u043d\u043e\u0439 \u043f\u043e\u0434\u0443\u0448\u043a\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/552840\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0433\u0434\u043e\u043b\u043b\u044b \u043d\u0430 Unity 3D<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/553420\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u044b. \u0411\u0430\u0441\u043a\u0435\u0442\u0431\u043e\u043b \u043d\u0430 Unity 3D<\/a><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b: <\/p>\n<p>&#8212; \u0441 \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u0430\u043c\u0438 \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438;<br \/>&#8212; \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432;<br \/>&#8212; \u0441 AudioSource \u0438 \u0441 Rigidbody \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434;<br \/>&#8212; \u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430, \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043d\u0430 \u0438\u0433\u0440\u043e\u043a\u0430 (\u0437\u0432\u0443\u043a, \u0441\u0432\u0435\u0442 \u0438 \u0441\u0432\u0435\u0447\u0435\u043d\u0438\u0435, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0438 \u0441\u043b\u0435\u0434 \u043e\u0442 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430);<br \/>&#8212; \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0444\u0430\u0431\u043e\u0432.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0442\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u044b \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c, \u0438 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0443\u0447\u0435\u043d\u0438\u043a\u0430\u043c\u0438, \u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043c\u0435\u0441\u0442\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c mecanim-\u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<h2>\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 <a href=\"https:\/\/disk.yandex.ru\/d\/djqB8cpF_jnAYw?w=1\" rel=\"noopener noreferrer nofollow\">\u0430\u0441\u0441\u0435\u0442<\/a>.<br \/>\u041f\u043e\u043c\u0438\u043c\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0430\u043a\u0435\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0434\u0435\u043a\u0430\u043b\u0435\u0439. \u0415\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u043a\u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0443\u0440\u043e\u043a\u0430 \u0440\u0430\u0437\u0431\u0438\u0442 \u043d\u0430 2 \u0447\u0430\u0441\u0442\u0438 &#8212; \u0442\u0438\u0440 \u0438 \u0433\u0440\u0430\u043d\u0430\u0442\u044b.<\/p>\n<h2>\u0422\u0438\u0440<\/h2>\n<p>\u0422\u0438\u0440 &#8212; \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0434\u0435\u0442\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u0430\u043c\u0438. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f, \u0431\u044b\u043b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0430\u0441\u0441\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0433\u0440\u0443\u043f\u043f\u0435 \u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0441\u0441\u0435\u0442, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043c\u0438\u0448\u0435\u043d\u0438 \u0438 \u0435\u0451 \u043f\u0440\u0435\u0444\u0430\u0431\u0430.<br \/>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0443\u0440\u043e\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0435\u0439\u043a\u0430\u0441\u0442 \u0438 \u0442\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0438\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 DecalShooter, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u0435\u043a\u0430\u043b\u0438, \u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0435\u0439\u043a\u0430\u0441\u0442. \u0412 \u043d\u0451\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u0434 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043c\u0438\u0448\u0435\u043d\u044c\u044e.<br \/>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u0443 \u043c\u0438\u0448\u0435\u043d\u044c. \u0415\u044e \u0441\u043b\u0443\u0436\u0438\u0442 \u0446\u0438\u043b\u0438\u043d\u0434\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043f\u043e Y \u0434\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u043b\u0430\u0442\u0438\u043d\u044b, \u0443\u0434\u0430\u043b\u0438\u0442\u044c CapsuleCollider \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c MeshCollider \u0441 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 Convex. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430 \u0446\u0438\u043b\u0438\u043d\u0434\u0440 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043c\u0438\u0448\u0435\u043d\u0438, \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043b\u0438\u043d\u0434\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f point light, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u043c\u0438\u0448\u0435\u043d\u044c, \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 AudioSource \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430, \u0430 \u043d\u0430 \u0441\u0430\u043c \u0446\u0438\u043b\u0438\u043d\u0434\u0440 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f Rigidbody \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0442\u0438\u043f\u0430 Continius Dynamic \u0438 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 isKinematik. \u0423 AudioSource \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0431\u0440\u0430\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 PlayOnAwake \u0438 \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0437\u0432\u0443\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432 \u043c\u0438\u0448\u0435\u043d\u044c.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Target, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043d\u0430\u0448\u0443 \u043c\u0438\u0448\u0435\u043d\u044c.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0438\u0448\u0435\u043d\u044c \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u0435\u0444\u0430\u0431, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0438\u0448\u0435\u043d\u0438 \u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043a\u043e\u0434\u0443 \u043c\u0438\u0448\u0435\u043d\u0438.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine;   public class Target : MonoBehaviour {     public GameObject light;     public Rigidbody rig;     public AudioSource src;       bool enabled = true;       \/\/ Use this for initialization      void Start() {         rig = GetComponent&lt;Rigidbody&gt;();         src = GetComponent&lt;AudioSource&gt;();      }       \/\/ Update is called once per frame      void Update() {       }       public void shoot() {         if (!enabled) {            return;         }           rig.isKinematic = false;          light.SetActive(false);          src.Play();           enabled = false;     }   } <\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043c\u0438\u0448\u0435\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434&nbsp;\u200bshoot,\u200b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u043c\u0438\u0448\u0435\u043d\u0438. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 DecalShooter \u043f\u043e\u043f\u0430\u043b\u0438 \u043b\u0438 \u043c\u044b \u0432 \u043c\u0438\u0448\u0435\u043d\u044c \u0438 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430&nbsp;\u200bshoot. \u0412 \u0440\u0435\u0439\u043a\u0430\u0441\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cs\">   if (Input.GetKeyDown(KeyCode.Mouse0)) {             time = 0.3f;              ShootSource.Play();              anim.Play(\"fire\");              Muzzleflash.SetActive(true);             \/\/ \u0421\u0430\u043c\u0430 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0430              RaycastHit hitInfo;             Vector3 fwd = transform.TransformDirection(Vector3.forward);                           if (Physics.Raycast(transform.position, fwd, out hitInfo, 100f)) {                 GameObject go = Instantiate(                     DecalPrefab,                     hitInfo.point,                      Quaternion.LookRotation(                         Vector3.Slerp(-hitInfo.normal, fwd, normalization)                      )                 ) as GameObject;                 go.GetComponent&lt;DecalUpdater&gt;().UpdateDecalTo(                     hitInfo.collider.gameObject,                      true                 );                 Vector3 explosionPos = hitInfo.point;                 Target trg = hitInfo.collider.GetComponent&lt;Target&gt;();                                  if (trg) {                     trg.shoot();                 }                                  Rigidbody rb = hitInfo.collider.GetComponent&lt;Rigidbody&gt;();                                  if (rb != null) {                     rb.AddForceAtPosition(fwd * power, hitInfo.point, ForceMode.Impulse);                     Debug.Log(\"rb!\");                 }              }             \/\/ \u0421\u0430\u043c\u0430 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0430          }<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 hitInfo \u0438, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0443\u0434\u0430\u0451\u0442\u0441\u044f, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434&nbsp;\u200bshoot.\u200b \u041c\u0438\u0448\u0435\u043d\u044c \u043f\u0430\u0434\u0430\u0435\u0442, \u0441\u0432\u0435\u0442 \u043e\u0442 \u043c\u0438\u0448\u0435\u043d\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f, \u0437\u0432\u0443\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f. \u0414\u0430\u043b\u0435\u0435, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u0448\u0435\u043d\u044c \u043c\u0435\u043d\u044f\u043b\u0430 \u0446\u0432\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0438. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u0432 Target \u0441\u0442\u0440\u043e\u043a:<\/p>\n<pre><code class=\"cs\">light.SetActive(false);<\/code><\/pre>\n<p>\u043d\u0430<\/p>\n<pre><code class=\"cs\">light.GetComponent&lt;Light&gt;().color = Color.red;<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0432\u0435\u0442 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0413\u0440\u0430\u043d\u0430\u0442\u044b<\/h2>\n<p>\u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0443\u0440\u043e\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 &#8212; \u0434\u0430\u043b\u044c\u043d\u043e\u043c\u0435\u0440.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;   public class Lenght :  MonoBehaviour {     public Text Dalnost;     float rasstoyanie = 0; \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u0446\u0435\u043b\u0438       \/\/ Use this for initialization      void Start() {       }       \/\/ Update is called once per frame      void Update() {         RaycastHit hitInfo;                  if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hitInfo, 200)) {             rasstoyanie = hitInfo.distance;             Dalnost.text = rasstoyanie.ToString();         }     } }<\/code><\/pre>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043a\u0438\u043d\u0435\u043c \u0432 FPScontroller\/FirstPersonCharacter. \u0412 Canvas \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0435\u043a\u0441\u0442, \u0437\u0430\u043a\u0438\u043d\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442.<br \/>\u0412 \u044d\u0442\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0440\u0435\u0439\u043a\u0430\u0441\u0442, \u0438 \u043d\u0430 \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c, \u043a\u0430\u043a \u0440\u0435\u0439\u043a\u0430\u0441\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043a\u0430\u043a \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<br \/>\u041f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0439\u043a\u0430\u0441\u0442\u0430 \u043c\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0434\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 &#8212; \u0431\u0440\u043e\u0441\u043e\u043a \u0433\u0440\u0430\u043d\u0430\u0442\u044b. \u041c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u0440\u0430\u043d\u0430\u0442\u0443 \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043e\u0442 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438 \u043f\u0440\u0438\u0434\u0430\u0451\u043c \u0435\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0432\u0437\u0433\u043b\u044f\u0434\u0430. \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0444\u0430\u0431\u0430 \u0433\u0440\u0430\u043d\u0430\u0442\u044b \u0438 \u043a\u043e\u0434 \u0431\u0440\u043e\u0441\u043a\u0430.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic;  using UnityEngine; using UnityEngine.UI;   public class Length :  MonoBehaviour {     public Text Dalnost;     float rasstoyanie = 0; \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u0446\u0435\u043b\u0438      public GameObject sharik;       \/\/ Use this for initialization     void Start() {       }       \/\/ Update is called once per frame      void Update() {         RaycastHit hitInfo;                   if(Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), outhitInfo, 200)) {             rasstoyanie = hitInfo.distance;              Dalnost.text = rasstoyanie.ToString ();             if(Input.GetKeyDown(KeyCode.Mouse1)) {                 GameObject go = Instantiate(                     sharik,                      transform.position + Vector3.Normalize(hitInfo.point - transform.position),                      transform.rotation                 );                 Rigidbody rig = go.GetComponent&lt;Rigidbody&gt;();                 rig.velocity = Vector3.Normalize(hitInfo.point - transform.position) * 10;             }          }     }  }<\/code><\/pre>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0436\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 &#8212; \u0437\u0430\u0447\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435? \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043f\u0440\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u043d\u0435\u0431\u043e \u0431\u0440\u043e\u0441\u043e\u043a \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0422.\u043a. \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0443\u0440\u043e\u043a\u0430 \u043a\u043e\u0434 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e, \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0443\u0447\u0430\u0441\u0442\u043a\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043b\u043e \u0437\u0430 \u0441\u0430\u043c\u043e\u0439 \u0433\u0440\u0430\u043d\u0430\u0442\u043e\u0439. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 Grenade.<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine;   public class Grenade :  MonoBehaviour {     public Transform explosionPrefab;       void OnCollisionEnter(Collision collision) {         ContactPoint contact = collision.contacts[0];                  \/\/ Rotate the object so that the y-axis faces along the normal of the surface         Quaternion rot = Quaternion.FromToRotation(Vector3.up, contact.normal);         Vector3 pos = contact.point;          Instantiate(explosionPrefab, pos, rot);         Destroy(gameObject);     } }<\/code><\/pre>\n<p>\u0417\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u0433\u0440\u0430\u043d\u0430\u0442\u0443, \u043d\u0430 \u043c\u0435\u0448 Body \u0441\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043b\u043b\u0430\u0439\u0434\u0435\u0440\u0443 Convex, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0433\u0440\u0430\u043d\u0430\u0442\u0435 RIgidbody \u0438 \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u0433\u0440\u0430\u043d\u0430\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043f\u0440\u0435\u0444\u0430\u0431 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u043e \u0441\u0446\u0435\u043d\u044b.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0438\u0441\u0438\u0442, \u043d\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0442\u0438\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0432\u0437\u0440\u044b\u0432\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u044d\u0444\u0444\u0435\u043a\u0442 \u0432\u0437\u0440\u044b\u0432\u0430. \u0412 \u043d\u0451\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0432\u0435\u0442 \u043e\u0442 \u0432\u0437\u0440\u044b\u0432\u0430, AudioSource \u0441 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439 PlayOnAwake \u0438 \u0437\u0432\u0443\u043a\u043e\u043c \u0432\u0437\u0440\u044b\u0432\u0430, Spital Blend \u043d\u0430 90 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432 3\u0434 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0434\u0438\u0443\u0441 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430.<br \/>\u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u043b\u0451\u0442\u0430 Rigidbody \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442. \u0415\u0433\u043e \u043c\u044b \u043d\u0430\u0437\u043e\u0432\u0451\u043c Explosion:<\/p>\n<pre><code class=\"cs\">using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Explosion :  MonoBehaviour {     public float radius = 5.0f;     public float power = 10.0f;     public GameObject svet;      void Start() {         Destroy(svet, 0.1f);          Vector3 explosionPos = transform.position;         Collider[] colliders = Physics.OverlapSphere(explosionPos, radius);          foreach(Collider hit in colliders) {             Rigidbodyrb = hit.GetComponent&lt;Rigidbody&gt;();             if (rb != null) {                 rb.AddExplosionForce(power,<\/code><\/pre>\n<\/p>\n<p><\/br><\/p>\n<\/p>\n<\/p>\n<p><\/br><\/br><\/br><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-322683","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322683"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322683\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}