Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#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