Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualbelfegor

Posted 17 August 2013 - 02:56 PM

static D3DXVECTOR3 dir(1.0f, 0.0f, 0.0f);
pos = pos + dir * moveSpeed * dt;
 
if(pos.x > maxX)
{
    dir.x = -1.0f
}
else if(pos.x < minX)
{
    dir.x = 1.0f
}

#1belfegor

Posted 17 August 2013 - 02:56 PM

static D3DXVECTOR3 dir(1.0f, 0.0f, 0.0f);
pos = pos + dir * moveSpeed * dt;
 
if(pos.x > maxX)
{
    dir.x = -1.0f
}
else if(pos.x < minX)
{
        dir.x = 1.0f
}

PARTNERS