31
General / Re: SFML cicrle movement
« on: December 24, 2018, 12:07:15 am »
Hi Guys
I have one doubt: shouldn't the rotation attribute be updated after that formula? Or it is automatically?
body.move( -sin(body.getRotation()*3.14159265 / 180)*-3, -cos(body.getRotation()*3.14159265 / 180) * 3);
If you don't do this
body.setRotation(body.getRotation() + rotation);
wouldn't it go like by a line (constant)?
I have one doubt: shouldn't the rotation attribute be updated after that formula? Or it is automatically?
body.move( -sin(body.getRotation()*3.14159265 / 180)*-3, -cos(body.getRotation()*3.14159265 / 180) * 3);
If you don't do this
body.setRotation(body.getRotation() + rotation);
wouldn't it go like by a line (constant)?