Sprites can pass through other 1px wide sprites?

For questions about using Classic.

Post » Sun Jun 06, 2010 3:09 am

I am trying to remake a game with a left and right playfield where there is a 1 pixel wide dividing wall that occasionally moves position. When the wall is set to 2 pixels wide the player sprites (using gridmovement) cannot pass through them but when set to 1 pixel wide they do pass. Is this related to a collision mask bug I have been reading about?

If gridmovement supported a halt movement I could workaround this issue. Other wise I could have a seperate, invisible and wider walls for each side, but I would need help grouping:
left player+its wall to only collide
right player+its wall to only collide

Thanks.



10 points if you can guess the game :wink:
B
1
G
2
Posts: 6
Reputation: 637

Post » Sun Jun 06, 2010 4:38 am

It's not a bug, the Grid movement with "player controlled" checks if the sprite can move in a particular direction by checking if the sprite overlaps any solid at it's destination. If no collision is detected the sprite will move without checking the in between positions for collisions.

I whipped up an example on how to overcome the problem using the "Manual" mode of the grid movement and checking 1 pixel away before movement:
[url:1b1jhn4z]http://dl.dropbox.com/u/5426011/examples/grid.cap[/url:1b1jhn4z]
req 0.99.84
B
79
S
24
G
54
Posts: 4,753
Reputation: 40,769

Post » Sun Jun 06, 2010 5:35 am

Wow. Thanks very much.
B
1
G
2
Posts: 6
Reputation: 637


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests