Page 1 of 1

Need of Collision detection

Posted: Wed Aug 22, 2012 6:23 am
by Surbhit29
I am new to LiveCode. Can anyone please tell me what is the need of collision detection and why we use it in programming?
I have followed the pdf that came with animation engine and in that we have a method of detecting collision. In that whenever collision occurs the field shows about the collision. Now what is the use of that information available in field and how and where can it be put to use.

Re: Need of Collision detection

Posted: Wed Aug 22, 2012 6:48 am
by shaosean
Collision detection is good to make sure an object does not go through another object.. This is useful in a game situation where you do not want your character to walk through walls (unless they are a ghost I guess ;) )

Not too certain what information appears in the field, but it is probably just some feedback that Malte has decided to display to show that something is happening.. What you do with it is your choice..

Re: Need of Collision detection

Posted: Wed Aug 22, 2012 7:12 am
by Surbhit29
Thnx Shaosean...
Can you tell me how to do that? How to prevent object to not go through other object?

Re: Need of Collision detection

Posted: Wed Aug 22, 2012 9:27 am
by shaosean
When you detect a collision, you stop moving the object ;-)