I have an image i need to rotate to an angle then draw it to the canvas at a point. I currently have this:
var image = roach.image;
image.style.msTransform = 'rotate(' + roach.heading + 'deg)';
this.gameContext.drawImage(image, roach.position.x, roach.position.y);
How can i edit this to make it work, where roach.heading is my angle i want to rotate it to in degrees.
Try this:
jsfiddle: http://jsfiddle.net/PwzEc/