Physics disable collision via pick error

Bugs will be moved here once resolved.

Post » Thu Jan 29, 2015 3:02 am

Problem Description
When picking an instance of a physics object (by Pick by UID) and then disabling collision of that object with another physics object, a different instance also has its collision filtering incorrectly altered.

Attach a Capx
physics problem.capx


Description of Capx
There are a few instances of one sprite on screen - all immovable physics objects. There is also another circular 'wheel' object that falls and bounces on the immovable objects. When the wheel Y position exceeds a certain value, one instance of the immovable objects is picked by UID and its collision filter is altered to disable collisions with the wheel. To indicate when this happens and which instance has been picked, the immovable object changes animation frame.

If you select asm.js and then run in asm.js or box 2d then the problem is not apparent - you have to run this in box 2d without making any physics engine type selections....

Edit - it seems a bit more fragile than my first assumption here. Sometimes it works... sometimes it doesn't work... The asm.js might be a red herring...

Steps to Reproduce Bug
  • Run the layout
  • Observe the result

Observed Result
The vertical immovable object changes color to indicate that it has been picked for the collision filter change. However, after bouncing on a different instance of the immovable sprite object, the wheel then falls through the 'floor' - a third instance of the immovable sprite - even though it was not picked for collision filter change and it did not have its animation frame altered to indicate such a change.

Expected Result
The wheel should be able to collide with all instances of the immovable object that have not been picked by UID to have their collision filtering altered.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
W8.1 x64

Construct 2 Version ID
r195 x64
You do not have the required permissions to view the files attached to this post.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Thu Jan 29, 2015 5:44 pm

I can confirm this.

But is it really a bug?
It says it's a "Global setting"
So i guess it simply counts for all instances, no matter what you're trying to pick.


In your example... if you set the Y lower "higher in layout" than 220 (for example to 50)
you will notice that collisions will be disabled for ALL 3 "Sprite"s.

According to that i would guess it's working as intended.


But if it's working as intended with the global setting.
I would say that's quite a really strict action and rather useless.
B
39
S
8
G
3
Posts: 158
Reputation: 2,995

Post » Thu Jan 29, 2015 5:54 pm

Sorry, it's by design that the disable collisions feature applies to the whole object type, not specific instances. So this is not a bug.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Thu Jan 29, 2015 7:32 pm

@Everade, @Ashley - thanks for the re-education and apologies for the duff report.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests