Solid Objects out of the layout

Bugs will be moved here once resolved.

Post » Sun Apr 10, 2016 4:04 pm

Problem Description
We have some solid objects out of the layout that if the player hits them, the player should destroy. One of the objects is at top of the layout, one at bottom, one at left and one at right. When the player hits the solid objects on top and left, it destroys but when it hits the solid objects at bottom and right it doesn't destroy. when the objects are not solid the player destroys but when they are solid, the player doesn't destroy when it hits the solid objects at bottom and right.

Attach a Capx
http://s000.tinyupload.com/index.php?fi ... 3824240600

Description of Capx
There is a player object that you can control, hit the top, left, bottom and right to see the results.

Steps to Reproduce Bug
  • Hit the top and the player destroys
  • Hit the left and the player destroys
  • Hit the right and the player doesn't destroy
  • Hit the bottom and the player doesn't destroy

Observed Result
The player doesn't destroy when hits the right and bottom

Expected Result
The player must destroy when hits the right and bottom

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • NW.js: (YES)

Operating System and Service Pack
Win 10 64bit

Construct 2 Version ID
r221
B
45
S
19
G
3
Posts: 102
Reputation: 4,598

Post » Sun Apr 10, 2016 4:43 pm

@HessamoddinS - I am not sure but it might not be a bug. It might just be a floating-point inaccuracy. But I manage to find a solution, changing the angle of the tiledbackground from 0 to 180 or -180 or changing it's size from 20 to -20. It's not really a serious problem, only needs some workaround.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Tue Apr 12, 2016 11:22 am

Closing as won't fix: because the objects are solid, it's the job of the 8 direction behavior to prevent itself from ever overlapping with the solid objects, hence the collision event should never fire. I don't know why it does destroy on two of them, it shouldn't on any, but this is definitely not something you should rely on.

The workaround is obvious: there's no point making an object solid if it is destroyed as soon as you touch it, so just remove the solid behavior...
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023

Post » Wed Apr 13, 2016 3:43 pm

Ashley wrote:Closing as won't fix: because the objects are solid, it's the job of the 8 direction behavior to prevent itself from ever overlapping with the solid objects, hence the collision event should never fire. I don't know why it does destroy on two of them, it shouldn't on any, but this is definitely not something you should rely on.

The workaround is obvious: there's no point making an object solid if it is destroyed as soon as you touch it, so just remove the solid behavior...

but what if I need an object that be solid for object x and when collide with object y, object y destroys?
B
45
S
19
G
3
Posts: 102
Reputation: 4,598

Post » Wed Apr 13, 2016 5:35 pm

Use "Is overlapping at offset" or a larger detector sprite.
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests