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! / mouse and image collision

Author
Message
Sol462
21
Years of Service
User Offline
Joined: 12th Sep 2004
Location: playing with the spazookeedoo
Posted: 24th Dec 2004 07:51
anyone know how i would check for collision between an image and the mouse? i really dont feel like checking for coordinates of 6 images each with a different size.
Zone Chicken
22
Years of Service
User Offline
Joined: 25th Jan 2004
Location: `~-..-~`~-..-~`
Posted: 24th Dec 2004 12:57 Edited at: 24th Dec 2004 13:03
make a small black box sprite and position it to your mouse hidden, then check if collision between the mouse collision sprite and level sprites are true.
Here's a basic example from a game im working on.

Sol462
21
Years of Service
User Offline
Joined: 12th Sep 2004
Location: playing with the spazookeedoo
Posted: 24th Dec 2004 15:35 Edited at: 24th Dec 2004 15:47
never thought of it that way. thanks. (equals major code revision time , but hey, much better than coordinates )
(semi-unrelated), but isnt there a command in dbc that changes the mouse cursor thingie? im guessing you'd use an image for that whilst hiding the mouse.

coffee + monkeys + creativity = games

Login to post a reply

Server time is: 2026-06-11 14:47:39
Your offset time is: 2026-06-11 14:47:39