How can I set the rotation of a shape to the same as my image?
Posted
by
BleedObsidian
on Game Development
See other posts from Game Development
or by BleedObsidian
Published on 2012-10-24T17:34:08Z
Indexed on
2012/10/24
23:18 UTC
Read the original article
Hit count: 165
The way you set rotations of images is different from setting shape rotations. So how can I make the shape have the same rotation as my image?
This is how my image rotates:
if(input.isKeyDown(Input.KEY_RIGHT))
{
rotate += rotateSpeed * delta;
image.rotate(rotate - image.getRotation());
}
How can I get the same effect but with a shape?
For example:
How can I get that rectangle to be at the same rotation as the car?
© Game Development or respective owner