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.

Dark GDK / How to use dbMoveSprite()?

Author
Message
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 27th Jan 2009 17:24
Hi all,

Is there a way to use dbMoveSprite() to move a sprite in any direction? I have used positive and negative values for the velocity and the sprite moves up and down. How do I get it to move left and right?

Cheers.

Of all the things I've lost .. I miss my marbles most of all.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Jan 2009 18:18
Use dbRotateSprite() to change the way its facing.
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 27th Jan 2009 23:17
As simple as that

Thanks very much Matty!

Of all the things I've lost .. I miss my marbles most of all.
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 28th Jan 2009 09:47
Ok, I tried that and it works, but the problem is I really wanted to be able to move the sprite in any direction without changing its orientation. If I rotate it 90 degrees so that it moves sideways, the sprite is also on its side.

Of all the things I've lost .. I miss my marbles most of all.
CheatCat
17
Years of Service
User Offline
Joined: 7th Mar 2007
Location: Sweden
Posted: 28th Jan 2009 10:56
You have to reposition the sprite instead of using dbMoveSprite().
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 28th Jan 2009 11:59
Yep, thanks for that. dbMoveSprite() seemed to be an easier option because you don't have to keep track of the x,y values.

Of all the things I've lost .. I miss my marbles most of all.

Login to post a reply

Server time is: 2024-11-25 13:32:46
Your offset time is: 2024-11-25 13:32:46