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.

Newcomers DBPro Corner / Rotate Sprite

Author
Message
RapidZ
17
Years of Service
User Offline
Joined: 2nd Apr 2007
Location: Corby, Northants
Posted: 19th Feb 2010 18:13
Hello,

I am new to dark basic and i am trying to create a ping pong kind of game. I have been using the F1 help menu and created most of the game, i am currently trying to rotate teh angle of the ball using this code.



The only problem with this code is that it rotates the sprite from the corner and i need it to rotate from the centre of the sprite.

How would i achieve this?

Thank you,
Shane Rutter

RapidZ - World Of Warcraft Player
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 20th Feb 2010 02:07
Hay RapidZ,

The Sprite Command,

OFFSET SPRITE Sprite Number, XOffset, YOffset

Will offset the point of rotation for you.

If were sprite image is 16X16
The XOffset and YOffset will be 8x8.
RapidZ
17
Years of Service
User Offline
Joined: 2nd Apr 2007
Location: Corby, Northants
Posted: 20th Feb 2010 10:39
Hello,

Thank you for this, i dont no how i missed this command in the F1 help thing.

Shane Rutter
Serverbase
http://serverbase.co.uk

Login to post a reply

Server time is: 2024-09-28 14:24:01
Your offset time is: 2024-09-28 14:24:01