1
General / Problems with Drawable.Rotate
« on: April 14, 2010, 12:07:25 am »
Is there any way to rotate an image from an offset axis? Basically I want a wheel to spin in circles but it rotates around a large axis...
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
float enemyVelocity = 150.0f * ElapsedTime;
float enemyXMax = wWidth - Sprite2.GetScale().x;
float enemyXMin = 0 + Sprite2.GetScale().x;
float spriteWidth = Sprite2.GetScale().x;
float spriteX;
spriteX = Sprite2.GetPosition().x;
cout << spriteX << endl;
if (spriteX >= enemyXMax)
{
enemyVelocity = enemyVelocity * -1;
spriteX = enemyXMax;
}
else if (spriteX <= enemyXMin);
{
enemyVelocity = enemyVelocity * -1;
spriteX = enemyXMin;
}
Sprite2.Move(enemyVelocity, 0);
sf::Vector2f::x EnemyWidthCheck;
float enemyWidthCheck = EnemyWidthCheck.GetPosition;
if (enemyWidthCheck >= wWidth)
{
enemyMove = enemyMove * -1;
}