Sorry for possibly very noob question but I've googled thoroughly and I don't where else to ask.
For some reason when using Sprite.move I can freely multiply the Vector2f I put in it but when I use Sprite.setPosition it gives an error.
for example:
int main()
{
Sprite mySprite;
Vector2f direction(1, 1);
while (window.isOpen())
{
mySprite.move(direction * 0.5);
}
}
This works fine but when I try:
int main()
{
Sprite mySprite;
Vector2f direction(1, 1);
while (window.isOpen())
{
mySprite.setPosition(direction * 100);
}
}
I get the error:
"no match for 'operator*' (operand types are 'double' and 'sf::Vector2f' {aka 'sf::Vector2<float>'})|"
Please let me know what the issue is and thanks in advance and sorry for any formatting errors