{"id":2062,"date":"2023-10-21T01:02:38","date_gmt":"2023-10-20T16:02:38","guid":{"rendered":"http:\/\/yoonhada.com\/?p=2062"},"modified":"2023-12-26T21:13:06","modified_gmt":"2023-12-26T12:13:06","slug":"lerp%eb%a5%bc-%ed%94%84%eb%a1%9c%ec%b2%98%eb%9f%bc-%ec%82%ac%ec%9a%a9%ed%95%98%eb%8a%94-%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"http:\/\/yoonhada.com\/?p=2062","title":{"rendered":"Lerp\ub97c \ud504\ub85c\ucc98\ub7fc \uc0ac\uc6a9\ud558\ub294 \ubc29\ubc95"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-chico-unity-3-d wp-block-embed-chico-unity-3-d\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"IXzRyOwsrd\"><a href=\"https:\/\/chicounity3d.wordpress.com\/2014\/05\/23\/how-to-lerp-like-a-pro\/\">How to Lerp like a&nbsp;pro<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\u201cHow to Lerp like a\u00a0pro\u201d \u2014 Chico Unity3D\" src=\"https:\/\/chicounity3d.wordpress.com\/2014\/05\/23\/how-to-lerp-like-a-pro\/embed\/#?secret=kDNnoj710k#?secret=IXzRyOwsrd\" data-secret=\"IXzRyOwsrd\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ub098\ub294 \uc774\ub7f0 \uc885\ub958\uc758 \uc77c\uc744 \ub108\ubb34 \uc790\uc8fc \ubcf8\ub2e4:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">transform.position = Vector3.Lerp(startPos, endPos, Time.deltaTime);\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uadf8\uac83\uc744 \uac8c\uc2dc\ud558\ub294 \uc0ac\ub78c\uc740 \uc77c\ubc18\uc801\uc73c\ub85c \uadf8\uac83\uc774&nbsp;<code>Vector3.Lerp<\/code>&#8220;\uae68\uc84c\ub2e4&#8221;\uace0 \ud655\uc2e0\ud558\uc9c0\ub9cc \uc2e4\uc81c \ubb38\uc81c\ub294 \uadf8\ub4e4\uc774 \uadf8\uac83\uc744 \uc62c\ubc14\ub974\uac8c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4\ub294 \uac83\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;\uc120\ud615 \ubcf4\uac04&#8221;\uc758 \uc57d\uc5b4\uc778 Lerp\ub294 \ub9e4\uc6b0 \uac04\ub2e8\ud55c \uc791\uc5c5\uc744 \uc218\ud589\ud569\ub2c8\ub2e4. \ub450 \uac12\uc774 \uc8fc\uc5b4\uc9c0\uba74 \ub450 \uac12&nbsp;<code>x<\/code>\uc0ac\uc774&nbsp;\uc758 \ubc31\ubd84\uc728&nbsp;<code>y<\/code>\uac12\uc744 \ubc18\ud658\ud569\ub2c8\ub2e4 .&nbsp;<code>t<\/code>\ucd9c\ub825\uc774 \ubcc0\uacbd\ub420 \uac83\uc73c\ub85c \uc608\uc0c1\ub418\ub294 \uacbd\uc6b0 \uc804\ub2ec\ud558\ub294 \uc778\uc218\uc5d0 \uc774\ub97c \ubc18\uc601\ud574\uc57c \ud569\ub2c8\ub2e4!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Time.deltaTime<\/code>\uc704\uc758 \uc608\uc5d0\uc11c\ub294 \uac00\uc7a5 \ucd5c\uadfc \ud504\ub808\uc784 \ub3d9\uc548 \uacbd\uacfc\ud55c \uc2dc\uac04\ub9cc&nbsp;\uc804\ub2ec\ud558\ubbc0\ub85c \ub97c \uc804\ub2ec\ud558\ub294 \uac83\uc740 \uc758\ubbf8\uac00 \uc5c6\uc2b5\ub2c8\ub2e4 .&nbsp;\uac8c\uc784\uc774 \uc77c\uc815\ud55c 50fps\ub85c \uc2e4\ud589\ub418\ub294&nbsp;\uacbd\uc6b0&nbsp;<em>\ud56d\uc0c1<\/em><code>0.02<\/code>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud574\ub2f9 \ud0c0\uc774\uba38\uac00 \uc5ec\ub7ec \ud504\ub808\uc784\uc5d0 \uac78\uccd0 \ub204\uc801\ub418\ub3c4\ub85d \ud558\uba74 \ub354 \ub098\uc740 \uacb0\uacfc\ub97c \uc5bb\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\uc640 \uac19\uc740 \ub0b4\uc6a9\uc774 \uc694\uc810\uc744 \uc804\ub2ec\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class LerpExample : MonoBehaviour {\n    float lerpTime = 1f;\n    float currentLerpTime;\n \n    float moveDistance = 10f;\n \n    Vector3 startPos;\n    Vector3 endPos;\n \n    protected void Start() {\n        startPos = transform.position;\n        endPos = transform.position + transform.up * moveDistance;\n    }\n \n    protected void Update() {\n        \/\/reset when we press spacebar\n        if (Input.GetKeyDown(KeyCode.Space)) {\n            currentLerpTime = 0f;\n        }\n \n        \/\/increment timer once per frame\n        currentLerpTime += Time.deltaTime;\n        if (currentLerpTime > lerpTime) {\n            currentLerpTime = lerpTime;\n        }\n \n        \/\/lerp!\n        float perc = currentLerpTime \/ lerpTime;\n        transform.position = Vector3.Lerp(startPos, endPos, perc);\n    }\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\ube48 \uc7a5\uba74\uc744 \ub9cc\ub4e4\uace0, \ud050\ube0c\uc5d0 \ub193\uace0, \uc774 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \ucca8\ubd80\ud558\uace0, \uc2e4\uc81c\ub85c \uc791\ub3d9\ud558\ub294 \ubaa8\uc2b5\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ubcc0\uc218\ub294&nbsp;\uc6d0\ub798 \uc788\ub358&nbsp;<code>perc<\/code>\uacf3\uc5d0 \uc0ac\uc6a9\ub429\ub2c8\ub2e4 .&nbsp;<code>Time.deltaTime<\/code>\ubb34\uc5c7\uc785\ub2c8\uae4c&nbsp;<code>perc<\/code>?&nbsp;\uc774\ub294 Lerp\ub97c \ud1b5\ud55c \uc9c4\ud589 \uc0c1\ud669\uc744 \ub098\ud0c0\ub0b4\ub294&nbsp;<code>0<\/code>\uc640&nbsp;\uc0ac\uc774\uc758 \uc22b\uc790\uc785\ub2c8\ub2e4 .<code>1<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uad81\uae08\ud558\uc2e0 \ubd84\ub4e4\uc740&nbsp;<code>lerpTime<\/code>\ub610\ub294 \ubcc0\uacbd\ud558\uba74 \uacb0\uacfc\ub97c \ud655\uc778\ud574\ubcf4\uc138\uc694&nbsp;<code>moveDistance<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ubaa8\ub4e0 \uac83\uc744 Lerp<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Unity\ub294 \ub2e4\uc591\ud55c \uac12\uc744 \ubcf4\uac04\ud558\uae30 \uc704\ud55c \ub3c4\uc6b0\ubbf8 \ud568\uc218\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Mathf.Lerp<\/code><\/li>\n\n\n\n<li><code>Vector3.Lerp<\/code><\/li>\n\n\n\n<li><code>Color.Lerp<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\ud558\uc9c0\ub9cc \uacb0\uad6d\uc5d0\ub294&nbsp;Mathf.Lerp&nbsp;\ub9cc \uc788\uc73c\uba74 \ub429\ub2c8\ub2e4.&nbsp;\ub2e4\ub978 \uac83\ub4e4\uc740 \ub2e8\uc9c0 \ud3b8\uc758\ub97c \uc704\ud55c \ubc29\ubc95\uc77c \ubfd0\uc785\ub2c8\ub2e4.&nbsp;\ubcf4\uac04\ud574\uc57c \ud560 \ud074\ub798\uc2a4\ub098 \ub370\uc774\ud130\uc5d0 \ub300\ud574 \uc790\uccb4 Lerp \ud568\uc218\ub97c \uc791\uc131\ud558\ub294 \uac83\uc740 \ucda9\ubd84\ud788 \uc27d\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unity\uac00 \ud68c\uc804\uc744 \ud45c\ud604\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ud558\ub294 \ucffc\ud130\ub2c8\uc5b8\uc758 \ud2b9\uc815 \uacbd\uc6b0\uc5d0\ub294 Slerp \ub610\ub294 \u201cSpherical Lerp\u201d\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ub450 \uac1c\uc758 \uac12\uc774 \uc788\uace0 \ub450 \uac12 \uc0ac\uc774\ub97c \uc6d0\ud65c\ud558\uac8c \uc804\ud658\ud558\uace0 \uc2f6\uc73c\uc2ed\ub2c8\uae4c?&nbsp;\ubcf4\uac04\uc740 \ub2f9\uc2e0\uc758 \uce5c\uad6c\uc785\ub2c8\ub2e4!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lerp \ub108\uba38<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\ub9cc\uc57d \uc6b0\ub9ac\uac00&nbsp;<code>t<\/code>\ub2e8\uc21c\ud55c \ubc31\ubd84\uc728\uc774 \uc544\ub2cc Lerp a\ub97c \ud1b5\uacfc\ud55c\ub2e4\uba74 \uc5b4\ub5bb\uac8c \ub420\uae4c\uc694?&nbsp;\ub450 \uc810 \uc0ac\uc774\uc5d0 \uadf8\ub798\ud504\ub85c \ud45c\uc2dc\ub41c \uc9c1\uc120 \ub300\uc2e0 \uc77c\uc885\uc758 \uace1\uc120\uc744 \uc6d0\ud558\uba74 \uc5b4\ub5bb\uac8c \ub420\uae4c\uc694?&nbsp;<code>0<\/code>\uc785\ub825\uc740 \uacfc&nbsp;\uc0ac\uc774\uc5d0 \uc788\uc5b4\uc57c&nbsp;<code>1<\/code>\ud558\uc9c0\ub9cc \uc774\ub97c \uc218\ud589\ud558\ub294 \uae30\ub2a5\uc774 \ub9ce\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc608\ub97c \ub4e4\uc5b4, sinerp\ub97c \uc0ac\uc6a9\ud558\uc5ec &#8220;\uc644\ud654&#8221;\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">float t = currentLerpTime \/ lerpTime;\nt = Mathf.Sin(t * Mathf.PI * 0.5f);\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-sinerp.png\"><img decoding=\"async\" src=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-sinerp.png?w=300&amp;h=185\" alt=\"interp-sinerp\" class=\"wp-image-48\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ub610\ub294 coserp\ub97c \uc0ac\uc6a9\ud558\uc5ec &#8220;\ud3b8\uc548\ud558\uac8c&#8221; \ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">t = 1f - Mathf.Cos(t * Mathf.PI * 0.5f)\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-coserp.png\"><img decoding=\"async\" src=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-coserp.png?w=300&amp;h=185\" alt=\"interp-coserp\" class=\"wp-image-52\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\uae30\ud558\uae09\uc218\uc801\uc778 \uc6c0\uc9c1\uc784\uc744 \ub9cc\ub4e4 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">t = t*t\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-quad.png\"><img decoding=\"async\" src=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-quad.png?w=300&amp;h=185\" alt=\"\uc778\ud130\ud504 \ucffc\ub4dc\" class=\"wp-image-49\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\uadf8 \uc790\uccb4\ub97c \uacf1\ud558\ub294 \uac83\uc5d0 \ub294 \ud765\ubbf8\ub85c\uc6b4 \ud2b9\uc9d5\uc774 \uc788\uc2b5\ub2c8\ub2e4.&nbsp;\uacfc&nbsp;\uc0ac\uc774\uc5d0 \uc788\ub294&nbsp;<code>t<\/code>\ud55c ,&nbsp;\uadf8 \uc790\uccb4\ub97c \uc5ec\ub7ec \ubc88&nbsp;\uacf1\ud558\uba74 \ud56d\uc0c1&nbsp;\uc640 \uc0ac\uc774\uc5d0 \uc788\ub294 \uc22b\uc790\uac00 \uc0dd\uc131\ub429\ub2c8\ub2e4&nbsp;.<code>t<\/code><code>0<\/code><code>1<\/code><code>t<\/code><code>0<\/code><code>1<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\uc2a4\ubb34\uc2a4\uc2a4\ud15d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\uc704\uc5d0\uc11c \uc5b8\uae09\ud55c \uacf1\uc148 \uc18d\uc131\uc740 \uc720\uba85\ud55c&nbsp;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Smoothstep\">&#8220;\uc2a4\ubb34\uc2a4 \uc2a4\ud15d&#8221; \uacf5\uc2dd<\/a>&nbsp;\uacfc \uac19\uc774 \uc774\uc9c0 \uc778(Ease In)&nbsp;<em>\ubc0f<\/em>&nbsp;\uc774\uc9c0 \uc544\uc6c3(Ease Out)\ud558\ub294 \uc77c\ubd80 \ubcf4\uac04 \ubc29\ubc95\uc758 \ud575\uc2ec \uac1c\ub150\uc785\ub2c8\ub2e4 .<a href=\"http:\/\/en.wikipedia.org\/wiki\/Smoothstep\"><\/a><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">t = t*t * (3f - 2f*t)\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-smooth.png\"><img decoding=\"async\" src=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-smooth.png?w=300&amp;h=185\" alt=\"\ub9e4\ub044\ub7ec\uc6b4\" class=\"wp-image-51\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\uc544\ub2c8\uba74 \uc81c\uac00 \uac1c\uc778\uc801\uc73c\ub85c \uc88b\uc544\ud558\ub294 &#8220;smootherstep&#8221;\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">t = t*t*t * (t * (6f*t - 15f) + 10f)\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-smoother.png\"><img decoding=\"async\" src=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-smoother.png?w=300&amp;h=185\" alt=\"\uc0c1\ud638 \ud3c9\ud65c\ud654\" class=\"wp-image-50\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\uc815\ub9d0 \ub9e4\ub044\ub7ec\uc6cc\uc694!&nbsp;<\/em>(\uc800\ud56d\ud560 \uc218 \uc5c6\uc5c8\uc2b5\ub2c8\ub2e4.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc81c\uac00 \uc5b8\uae09\ud55c \uc774\ub7ec\ud55c \ucd94\uac00 \uacf5\uc2dd \uc911 \ub2e4\uc218\ub294 Unity\uc5d0 \ud3ec\ud568\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc9c0\ub9cc, \uc774\ub97c \ud1b5\ud574 \ucc3e\uac70\ub098 \uc0dd\uc131\ud560 \uc218 \uc788\ub294 \ubaa8\ub4e0 \ud568\uc218\ub97c \uc790\uc720\ub86d\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\uc228\uc26c\uac8c \ud574\ub77c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\ub05d\ub098\uc9c0 \uc54a\ub294 Lerp\ub294 \uc5b4\ub5bb\uc2b5\ub2c8\uae4c?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Robert Yang\uc740&nbsp;&#8220;\uac00\ub054 \uc0ac\uc778\ud30c\ub85c \uac8c\uc784\uc758 \ubaa8\ub4e0 \uac83\uc744 \uc560\ub2c8\uba54\uc774\uc158\ud654\ud560 \uc218 \uc788\uc5c8\uc73c\uba74 \uc88b\uaca0\ub2e4&#8221;\uace0&nbsp;<a href=\"https:\/\/twitter.com\/radiatoryang\/status\/191272730069438464\">\ub9d0\ud55c \uc801\uc774 \uc788\uc2b5\ub2c8\ub2e4 .<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc77c\ubd80 \uac8c\uc784\uc5d0\uc11c\ub294 \ud50c\ub808\uc774\uc5b4\uac00 \uc2e4\ud589\ub418\ub294 \ub3d9\uc548 \uc57d\uac04\uc758 &#8220;\uba38\ub9ac \ud754\ub4e4\ub9bc&#8221;\uc774 \ubc1c\uc0dd\ud569\ub2c8\ub2e4.&nbsp;\ub2e4\ub978 \uac8c\uc784\uc5d0\uc11c\ub294 \uba54\uc778 \uba54\ub274 \uce74\uba54\ub77c\uc5d0 \ubd80\ub4dc\ub7ec\uc6b4 \ubc25\uc774 \ud544\uc694\ud569\ub2c8\ub2e4.&nbsp;\ub098\ub294 &#8220;\ucf54\ub97c \uace0\ub294&#8221; \ubd88\ube5b\uc774 \uc810\uc810 \ud76c\ubbf8\ud574\uc84c\ub2e4\uac00 \uc0ac\ub77c\uc9c0\ub294 \uac83\uc744 \ubcf8 \uc801\uc774 \uc788\uc2b5\ub2c8\ub2e4.&nbsp;\uc5b4\ub5a4 \uacbd\uc6b0\uc774\ub4e0, \ub098\ub294 \ud30c\ub3d9 \ud568\uc218\uac00 \uc5bc\ub9c8\ub098 \ud658\uc0c1\uc801\uc73c\ub85c \uc720\uc6a9\ud560 \uc218 \uc788\ub294\uc9c0 \uc9c0\uc801\ud558\uace0 \uc2f6\uc2b5\ub2c8\ub2e4. \uc785\ub825 \uc601\uc5ed\uc740 \ubb34\ud55c\ud558\ubbc0\ub85c \ub05d\uc774 \uc5c6\uc73c\uba70 \ucd9c\ub825 \ubc94\uc704\ub294 \uc881\uace0 \uc77c\uc815\ud558\ubbc0\ub85c \uc81c\uc5b4\ud558\uae30 \uc27d\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc608\ub97c \ub4e4\uc5b4, \ub2e4\uc74c \uc2a4\ud06c\ub9bd\ud2b8\ub294 \uc0ac\uc778\ud30c\uc5d0 \ub530\ub77c \uac1d\uccb4\ub97c \ucc9c\ucc9c\ud788 \uc704\uc544\ub798\ub85c \uc6c0\uc9c1\uc774\uac8c \ub9cc\ub4ed\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class BreatheSimple : MonoBehaviour {\n    Vector3 startPos;\n \n    protected void Start() {\n        startPos = transform.position;\n    }\n \n    protected void Update() {\n        float distance = Mathf.Sin(Time.timeSinceLevelLoad);\n        transform.position = startPos + Vector3.up * distance;\n    }\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc0ac\uc778\ud30c\ub97c \uc870\uc815\ud558\uba74 \ub354 \ub9ce\uc740 \uc81c\uc5b4\uac00 \uac00\ub2a5\ud574\uc9d1\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class Breathe : MonoBehaviour {\n    Vector3 startPos;\n \n    public float amplitude = 10f;\n    public float period = 5f;\n \n    protected void Start() {\n        startPos = transform.position;\n    }\n \n    protected void Update() {\n        float theta = Time.timeSinceLevelLoad \/ period;\n        float distance = amplitude * Mathf.Sin(theta);\n        transform.position = startPos + Vector3.up * distance;\n    }\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc9c4\ud3ed\uc740 \uac1c\uccb4\uac00 \uc774\ub3d9\ud558\ub294 \uac70\ub9ac\ub97c \uc81c\uc5b4\ud569\ub2c8\ub2e4.&nbsp;period\ub294 \uc5bc\ub9c8\ub098 \ube68\ub9ac \uc218\ud589\ub418\ub294\uc9c0\ub97c \uc81c\uc5b4\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-sineparams.png\"><img decoding=\"async\" src=\"https:\/\/chicounity3d.files.wordpress.com\/2014\/05\/interp-sineparams.png?w=300&amp;h=185\" alt=\"interp-sineparams\" class=\"wp-image-54\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ud50c\ub808\uc774\uc5b4\uc758 \uba38\ub9ac \ubd05\uc2ac\ub808\uc774\uc5d0\ub294 \uc791\uc740 \uc9c4\ud3ed\uacfc \uc9e7\uc740 \uae30\uac04\uc774 \ud544\uc694\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.&nbsp;\uba54\ub274 \uce74\uba54\ub77c\uc758 \ub290\ub9b0 \ud638\ud761\uc73c\ub85c \uc778\ud574 \ub9e4\uc6b0 \uc624\ub79c \uc2dc\uac04\uc774 \uac78\ub9ac\uac70\ub098 \ub2e4\uc591\ud55c \uc18d\ub3c4\ub85c \uc5ec\ub7ec \ucd95\uc5d0\uc11c \uc6c0\uc9c1\uc784\uc774 \ud544\uc694\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc218\ud559\uc744 \uc815\ub9ac\ud560 \uc218\ub9cc \uc788\ub2e4\uba74 \uc6d0\ud558\ub294 \ub3d9\uc791\uc740 \ubb34\uc5c7\uc774\ub4e0 \uc5bb\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc0ac\uc778\ud30c\uc758 \uc808\ub300\uac12\ub9cc \ucde8\ud558\uba74 \uc5b4\ub5bb\uac8c \ub420\uae4c\uc694?&nbsp;\uc0c1\ud5a5 \uc804\uc6a9 \uc218\uc2e0 \uac70\ubd80.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc0ac\uc778\ud30c\uc758 \ucd9c\ub825\uc744&nbsp;<code>0<\/code>\uacfc \uc0ac\uc774\uc5d0 \uace0\uc815\ud558\uba74 \uc5b4\ub5bb\uac8c \ub429\ub2c8\uae4c&nbsp;<code>1<\/code>?&nbsp;\ubc14\uc6b4\uc2a4 \uc0ac\uc774\uc5d0 \uc77c\uc2dc \uc911\uc9c0\uac00 \uc788\ub294 \uc704\ucabd\uc73c\ub85c\ub9cc \ubc14\uc6b4\uc2f1\ud569\ub2c8\ub2e4.&nbsp;\uc774\uc720\ub97c \uc54c \uc218 \uc788\ub098\uc694?&nbsp;\uace0\uc815\ub41c \uace1\uc120\uc744 \uc9c1\uc811 \uadf8\ub9ac\uba74 \uba85\ud655\ud574\uc9d1\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>0.6<\/code>\ud574\ub2f9 \uc6e8\uc774\ube0c\uc758 \ucd9c\ub825\uc744 \uacfc&nbsp;\uc0ac\uc774\uc5d0 \uace0\uc815\ud558\uba74 \uc5b4\ub5bb\uac8c \ub420\uae4c\uc694&nbsp;<code>1<\/code>?&nbsp;\uc77c\uc885\uc758 &#8220;\ub450\uadfc\ub450\uadfc&#8221; \ubaa8\uc158\uc744 \uc5bb\uc744 \uc218 \uc788\ub098\uc694?&nbsp;UI\uc5d0\uc11c \uacbd\uace0\ub97c \ud655\uc7a5\ud558\ub294 \ub370 \uc720\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\uae4c?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc815\ub9d0 \uba4b\uc9c0\uac8c \ub9cc\ub4e4\uace0 \uc2f6\ub2e4\uba74 \uc560\ub2c8\uba54\uc774\uc158 \uace1\uc120\uc744 \uc0ac\uc6a9\ud558\uc5ec Lerp \ub9e4\uac1c\ubcc0\uc218\ub97c \uad00\ub9ac\ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ub098\ub294 \uaf64 \ub09c\ud574\ud55c \uace1\uc120\uacfc \ud30c\ub3d9 \ud568\uc218\ub97c \uc791\uc131\ud588\uc2b5\ub2c8\ub2e4.&nbsp;\uadf8\uac83\uc744 \uc11e\ub294 \uac83\uc744 \ub450\ub824\uc6cc\ud558\uc9c0 \ub9c8\uc2ed\uc2dc\uc624.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ub2eb\ub294 \uc911<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Lerp\ub294 \ub2e4\uc591\ud55c \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc27d\uace0&nbsp;<em>\uac15\ub825\ud55c<\/em>&nbsp;\uae30\ub2a5\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc81c\uac00 \uc791\uc131\ud55c \uccab \ubc88\uc9f8 \ud50c\ub7ec\uadf8\uc778 \uc911 \ud558\ub098\ub294 \ub2e4\uc591\ud55c \uc90c\uacfc \uc704\uce58 \uc0ac\uc774\ub97c \ubcf4\uac04\ud558\ub294 \uce74\uba54\ub77c \uad00\ub9ac\uc790\uc600\uc2b5\ub2c8\ub2e4.&nbsp;\ub610\ud55c \ubcf4\uac04\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc7ac\ub8cc \ub9e4\uac1c\ubcc0\uc218, UI \uc560\ub2c8\uba54\uc774\uc158, \ubb3c\ub9ac\uc801 \ud798, \uc624\ub514\uc624 \ubcfc\ub968, \uac04\ub2e8\ud55c \ucef7\uc52c \ub4f1\uc744 \uad00\ub9ac\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\uac83\uc740 \uc0ac\uc6a9\ubc95\uc744 \uc54c\uba74 \uc810\uc810 \ub354 \uc790\uc8fc \ub4f1\uc7a5\ud558\ub294 \ub9dd\uce58 \uc911 \ud558\ub098\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ub9ce\uc740 \ucf54\ub4dc\ub97c \uc791\uc131\ud558\uace0 \uc2f6\uc9c0 \uc54a\uac70\ub098 \ube60\ub974\uac8c \uc2dc\uc791\ud558\uace0 \uc2f6\ub2e4\uba74 iTween, GoKit \ub610\ub294 Hotween\uacfc \uac19\uc740 \ud50c\ub7ec\uadf8\uc778\uc744 \uc0ac\uc6a9\ud558\uc5ec Unity\uc5d0 \ub9ce\uc740 \ucd94\uac00 \ubcf4\uac04 \uc9c0\uc6d0\uc744 \ucd94\uac00\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ub098\ub294 \uc774\ub7f0 \uc885\ub958\uc758 \uc77c\uc744 \ub108\ubb34 \uc790\uc8fc \ubcf8\ub2e4: \uadf8\uac83\uc744 \uac8c\uc2dc\ud558\ub294 \uc0ac\ub78c\uc740 \uc77c\ubc18\uc801\uc73c\ub85c \uadf8\uac83\uc774&nbsp;Vector3.Lerp&#8220;\uae68\uc84c\ub2e4&#8221;\uace0 \ud655\uc2e0\ud558\uc9c0\ub9cc \uc2e4\uc81c \ubb38\uc81c\ub294 \uadf8\ub4e4\uc774 \uadf8\uac83\uc744 \uc62c\ubc14\ub974\uac8c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4\ub294 \uac83\uc785\ub2c8\ub2e4. &#8220;\uc120\ud615 \ubcf4\uac04&#8221;\uc758 \uc57d\uc5b4\uc778 Lerp\ub294 \ub9e4\uc6b0 \uac04\ub2e8\ud55c \uc791\uc5c5\uc744 \uc218\ud589\ud569\ub2c8\ub2e4. \ub450 \uac12\uc774 \uc8fc\uc5b4\uc9c0\uba74 \ub450 \uac12&nbsp;x\uc0ac\uc774&nbsp;\uc758 \ubc31\ubd84\uc728&nbsp;y\uac12\uc744 \ubc18\ud658\ud569\ub2c8\ub2e4 .&nbsp;t\ucd9c\ub825\uc774 \ubcc0\uacbd\ub420 \uac83\uc73c\ub85c \uc608\uc0c1\ub418\ub294 \uacbd\uc6b0 \uc804\ub2ec\ud558\ub294 \uc778\uc218\uc5d0 \uc774\ub97c \ubc18\uc601\ud574\uc57c \ud569\ub2c8\ub2e4! Time.deltaTime\uc704\uc758 \uc608\uc5d0\uc11c\ub294 \uac00\uc7a5 \ucd5c\uadfc \ud504\ub808\uc784 \ub3d9\uc548 \uacbd\uacfc\ud55c \uc2dc\uac04\ub9cc&nbsp;\uc804\ub2ec\ud558\ubbc0\ub85c \ub97c &hellip;<br \/><a href=\"http:\/\/yoonhada.com\/?p=2062\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">Lerp\ub97c \ud504\ub85c\ucc98\ub7fc \uc0ac\uc6a9\ud558\ub294 \ubc29\ubc95<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,82],"tags":[42],"class_list":["post-2062","post","type-post","status-publish","format-standard","hentry","category-mathematics","category-resource","tag-unity"],"_links":{"self":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/posts\/2062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2062"}],"version-history":[{"count":1,"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/posts\/2062\/revisions"}],"predecessor-version":[{"id":2063,"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/posts\/2062\/revisions\/2063"}],"wp:attachment":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2062"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}