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.

Newcomers DBPro Corner / Sprite Collision problem

Author
Message
Lourg
20
Years of Service
User Offline
Joined: 20th Dec 2003
Location:
Posted: 26th Jul 2007 19:27
What is the order that sprites are detected for collisions?

Right now I have a sprite layered as following

1 sprite priority 0
2 sprite priority 2
3 sprite priority 3
4 sprite priority 4

I have sprite four to be set to the mouseX and mouse Y postion.

I have set up a text box to tell me what sprite for has collided with.

Now if I have sprites 1, 2, 3 over each other and I drag sprite four over them. Here is what I see.

4 over 1 sprite, sprite one hit
4 over 1 and 2, sprite two hit
4 over 1 and 3, sprite three hit
4 over 1 2 3, sprite two hit

The problem I'm having is why does sprite two show being hit if sprite three is drawn over it?

Login to post a reply

Server time is: 2024-09-27 02:24:25
Your offset time is: 2024-09-27 02:24:25