Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / new problem (sorry for early wasted post)

Author
Message
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 14th Feb 2004 03:51
I've gotten my mouse tracking working, sorta..my current problem is that when I try to set the offset for the bitmaps so they rotate in a certain spot..they aren't offsetting right. I'm trying to get them to go to where they'll rotate in the center of the bitmap. My next problem is that the turret isn't facing the right way..when you initialize the top of the turret is pointing at the reticle instead of the barrel (so the roof of the picture is pointing at the reticle instead of the right side of the picture like it should), not sure why..it looks like the code is right to me...any ideas?
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Feb 2004 15:52
This is how you offset to the centre of a sprite. You can still be 1 pixel out though if your sprites have an even number of pixels. You could of course draw sprites with an odd number of pixels.

spritewidth=(sprite width(1)/2)
spriteheight=(sprite height(1)/2)
offset sprite 1,spritewidth,spriteheight

Pincho.

Login to post a reply

Server time is: 2025-08-08 16:35:59
Your offset time is: 2025-08-08 16:35:59