I am currently working on a project where the character's arm is rotated around based on the mouse's location, using Math.atan2(). My problem is, I want the player to be holding weapons in their hand, and it gets a little weird. I'm using the sprite class for rotated images, so I have to position and then rotate the sprite in question. Currently, this is accomplished by this:

my issue is that when I position the image, it looks just fine:but when I add in the rotation (the first line):

I'm not sure what is causing this, but any help would be great ( sorry for the image shapes, I simply cropped them by hand ) could it be a problem with the sprite class? I've tried setting the origin for rotation, but it doesn't seem to help.

Busy between school, work, life, games, programming and general screwing around.If you'd like some pixel art for your game, send me a PM, i'll see what I can do.Current project: http://elementalwarblog.wordpress.com/

For some reason, setting the sprite origin is doing nothing for me. I set it to (Sprite.getWidth() - 8, 6) ( the location of the handle) and I'm still having the same issue, in the exact same location.

Busy between school, work, life, games, programming and general screwing around.If you'd like some pixel art for your game, send me a PM, i'll see what I can do.Current project: http://elementalwarblog.wordpress.com/

I have been using sprite.draw, I'm really not sure what I'm doing wrong. Would it be helpful if I posted the entire render() loop? in the create() loop it sets the player's arm's origin just fine, so I'm not sure what the error here is :/

Busy between school, work, life, games, programming and general screwing around.If you'd like some pixel art for your game, send me a PM, i'll see what I can do.Current project: http://elementalwarblog.wordpress.com/

Busy between school, work, life, games, programming and general screwing around.If you'd like some pixel art for your game, send me a PM, i'll see what I can do.Current project: http://elementalwarblog.wordpress.com/

Thanks nate, i'll just use the bare-bones and then see wht my issue is. Thanks

EDIT: decided to go the easy route since this has been bugging me for the past few days, and it looks nicer than it ever could the other way.

Busy between school, work, life, games, programming and general screwing around.If you'd like some pixel art for your game, send me a PM, i'll see what I can do.Current project: http://elementalwarblog.wordpress.com/

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org