Need of Collision detection

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
Surbhit29
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm

Need of Collision detection

Post by Surbhit29 » Wed Aug 22, 2012 6:23 am

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.

shaosean
Posts: 830
Joined: Thu Nov 04, 2010 7:53 am

Re: Need of Collision detection

Post by shaosean » Wed Aug 22, 2012 6:48 am

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..

Surbhit29
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm

Re: Need of Collision detection

Post by Surbhit29 » Wed Aug 22, 2012 7:12 am

Thnx Shaosean...
Can you tell me how to do that? How to prevent object to not go through other object?

shaosean
Posts: 830
Joined: Thu Nov 04, 2010 7:53 am

Re: Need of Collision detection

Post by shaosean » Wed Aug 22, 2012 9:27 am

When you detect a collision, you stop moving the object ;-)

Post Reply

Return to “Animation Engine”