์œ ์„ฑ์ด ์ง€๊ตฌ์— ์ถฉ๋Œํ•˜๊ฒŒ ํ•˜๋ ค๊ณ  ํ•˜๋Š”์ค‘์ธ๋ฐ

๋ณด๊ฐ„์œผ๋กœ ์ด๋™์ค‘์ธ๋ฐ ์™œ ์†๋„๊ฐ€ ์ ์  ์ฆ๊ฐ€ํ•˜๋Š”๊ฑธ๊นŒ์š”


์šฐ์„  ์ด๋™ํ•จ์ˆ˜๋Š” ์ด๋ ‡๊ฒŒ ์ž‘์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค

void Meteor::Move(Planet* target, float delta)

{

static float time = 0.0f;


if (time > 1.0f)

time = 0.0f;


D3DXVECTOR3 vLerp;

D3DXVec3Lerp(&vLerp, &m_Pos, &target->GetPos(), time);

D3DXMatrixTranslation(&m_matTrans, vLerp.x, vLerp.y, vLerp.z);

m_matLocal = m_matTrans;


time += 0.05f * delta;

}


deleta๋Š”

static long old = 0;

long cur = clock();

float delta = (float)(cur - old) / 1000.0f;

old = cur;

์ด๋ ‡๊ฒŒ ๊ตฌํ•˜๊ณ ์žˆ์Šต๋‹ˆ๋‹ค...


์†๋„๋ฅผ ์ผ์ •ํ•˜๊ฒŒ ์ฆ๊ฐ€์‹œํ‚ค๊ณ ์‹ถ์€๋ฐ ์™œ ์ ์  ๋น ๋ฅด๊ฒŒ ์ด๋™ํ•˜๋Š”๊ฑธ๊นŒ์š”...