Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Collision Detection - AGAIN
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Canned




PostPosted: Sat Nov 24, 2007 12:53 pm   Post subject: Collision Detection - AGAIN

I got it so when I bump infront, they dont go through each other. Yet when I go to bump from behind, They literally swap places. So I wrote this code to stop it from doing that:
code:
if x1 > x4 and x3 < x2 and y4 < y1 and y3 < y2 then
        x1 := x1 + 5
        x2 := x2 + 5
        x3 := x3 - 5
        x4 := x4 - 5
    end if

and when I go to bump from behind, they push away from each other, and I cant stop it. Any help?
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: