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! / i h8 to bother

Author
Message
hpfan273
19
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 21st Mar 2007 00:33 Edited at: 21st Mar 2007 00:39
i hate to post this on here... cuz it is so simple... yet i can't do it... well... here it is:

i am having issues with my collision... i am using the sprite collision code... here is my code:


i would like to know why this code makes my character (sprite 1) jumps to it's starting position... how do i get it so that he stops moving... but doesn't go back to it's starting position? BTW... i am using DBC

.( \ / )
( O . o )
.( > < )

lol... i got bored

THANKS FOR STOPING AT A RED LIGHT... AND LETTING ME CRASH INTO YOU AT 80 MILES AN HOUR!!!
Thc03
22
Years of Service
User Offline
Joined: 19th May 2004
Location: Pavia - Italy
Posted: 21st Mar 2007 01:40 Edited at: 21st Mar 2007 01:41
1) you should update oldx and oldy everytime you move
2) however, will you find useful to know if the collision gets triggered on a specific axis?
(eg. may be you could want to know if the collision between 2 sprites is lateral - along the x - or vertical - along the y - if you want to change direction for something or so)

3) if your problem is just about stop moving, and not about restoring old coordinates, you should try something like

.

Bye, Berserk.
.
hpfan273
19
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 21st Mar 2007 03:58
how would i go about updating that?

THANKS FOR STOPING AT A RED LIGHT... AND LETTING ME CRASH INTO YOU AT 80 MILES AN HOUR!!!

Login to post a reply

Server time is: 2026-07-05 22:52:06
Your offset time is: 2026-07-05 22:52:06