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 / keep a sprite attached to the mouse?

Author
Message
Wikaman1
15
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 19th Jul 2010 16:07
so I've got this code that attaches a sprite to the mouse when you click it.



but if you move the mouse too fast then it drops it presumably because it can only be drawn so fast....what's the best way to keep the sprite with the mouse no matter how fast you move it?
Thanks
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 19th Jul 2010 16:24
Once you have got the sprite with your mouse click and collision, just keep positioning the sprite at the mouse co-ordinates until the user clicks again or whatever.
In other words, don't use dbSpriteCollision() once your mouse has picked the sprite up.

Wikaman1
15
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 19th Jul 2010 16:33 Edited at: 19th Jul 2010 16:59
ok I'll give it a shot and report back, thanks

EDIT: worked fine thank youuu

Login to post a reply

Server time is: 2024-07-04 09:27:58
Your offset time is: 2024-07-04 09:27:58