[REQUEST/EXAMPLE] Per instance collision filtering

Report Construct 2 bugs here.

Post » Tue Mar 22, 2016 6:55 pm

Problem Description
The platform movement is in desperate need of an event that disables collision filtering to allow for individual instances of an object using the movement to react differently to solids. Disabling/Enabling solids for an object is a global change of the solids state, rather than an objects "interpretation" of the solids state.

Attach a Capx
https://www.dropbox.com/s/3ezha00yp7da5 ... tairs.capx

Description of Capx
Shows a demo of a staircase with enemies, the player and the enemies all using the platform movement.

Instead of "stairLtoRup" > Set Solid Disabled, I need an event that says: "PlayerObject" > Disable Collision Filtering that works per instance (so, if there's multiple enemies with platform movements, they can each have their collision filterings disabled, and it won't affect the other enemies of the same object.

Also, this example could be written so that collisions are only detected if certain conditions are met, in which case this example could be written in reverse so that collisions only come on rather than off if certain conditions are met

Steps to Reproduce Bug
  • Move player with arrow keys
  • Jump off/fall off stairs to ground
  • Notices how enemies react differently to the stairs depending on the players state.

Observed Result
The staircase's state changes to accommodate the player, whereas the players reaction to the stairs should only affect the player and not the other platform movement objects.

Expected Result
I would like to have instead of "stairLtoRup" > Set Solid Disabled, I need an event that says: "PlayerObject" > Disable Collision Filtering that works per instance (so, if there's multiple enemies with platform movements, they can each have their collision filterings disabled, and it won't affect the other enemies of the same object.

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

Operating System and Service Pack
Windows 7 Sp3

Construct 2 Version ID
r224
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Wed Mar 23, 2016 8:17 pm

Is this detailed enough, @Ashley ?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Sat Mar 26, 2016 7:31 am

Thanks for putting this together. Tbh I think Ashley wanted a topic here to placeholder for an update to the platform behaviour - this forum is the evernote for tweaks to c2. The case for collision filtering solids is incredibly strong if the behaviour is to be used by more than just one actor.
Last edited by Colludium on Mon Jul 04, 2016 5:06 am, edited 1 time in total.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,212
Reputation: 43,846

Post » Sat Mar 26, 2016 10:01 am

Colludium wrote:Thanks for putting this together. Tbh I think Ashley wanted a topic here to placeholder for an update to the platform behaviour - this forum is the evernote for tweaks to c2. The case for collision filtering solids is incredibly strong in if the behaviour is to be used by more than just one actor.

Exactly! It needs to work on a per-instance basis so any kind of NPC that uses the platform engine can respond differently to it's surroundings.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Thu Jun 09, 2016 6:24 am

@ashley is this a difficult switch to implement into a quick update for c2?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Sun Jul 03, 2016 9:57 pm

Colludium wrote:Thanks for putting this together. Tbh I think Ashley wanted a topic here to placeholder for an update to the platform behaviour - this forum is the evernote for tweaks to c2. The case for collision filtering solids is incredibly strong in if the behaviour is to be used by more than just one actor.

I'm still keen on having this as I can't really advance with a game I was working on until it's possible to ignore solids for an object per object. @Ashley any ideas when this might be available?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Jul 04, 2016 11:08 am

No, sorry, we can't give an ETA on any features.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Wed Jul 06, 2016 6:35 pm

Ashley wrote:No, sorry, we can't give an ETA on any features.

Would you say it would be difficult or relatively simple to implement for a future C2 update?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Jul 11, 2016 2:22 pm

I've looked in to this a little more. I'm still a little confused by this proposal. So it looks like you want the ability to disable the staircase's solidity independent of the enemies - so you can stand on the staircase while enemies pass through it, or pass through it while enemies stand on it.

However I'm not sure actually how your suggested "disable collision filtering" action would work, and how that would solve this. The only "collision filtering" the platform behavior does is to filter out any disabled solids. If you disable that "filtering", then it will act like all solids are enabled. So then you will always go up the stairs, never through them.

So I think I kind of see what you want, but I don't really understand what your proposed action would actually do internally, and how that fixes this. My first thought would be to have a Platform action to say something like "disable solid for this instance only", which isn't anything to do with disabling filtering. Alternatively there could be something like the LOS behavior where you can optionally choose a custom object/family to be solids instead of just using the solid behavior, and then you'd have to have two sets of objects for player and enemy collisions, which could then be separately disabled.

Either way, the Platform behavior has some of the most complex code in the engine, so I doubt this will be straightforward.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Wed Jul 13, 2016 5:39 am

Ashley wrote:I've looked in to this a little more. I'm still a little confused by this proposal. So it looks like you want the ability to disable the staircase's solidity independent of the enemies - so you can stand on the staircase while enemies pass through it, or pass through it while enemies stand on it.

However I'm not sure actually how your suggested "disable collision filtering" action would work, and how that would solve this. The only "collision filtering" the platform behavior does is to filter out any disabled solids. If you disable that "filtering", then it will act like all solids are enabled. So then you will always go up the stairs, never through them.

So I think I kind of see what you want, but I don't really understand what your proposed action would actually do internally, and how that fixes this. My first thought would be to have a Platform action to say something like "disable solid for this instance only", which isn't anything to do with disabling filtering. Alternatively there could be something like the LOS behavior where you can optionally choose a custom object/family to be solids instead of just using the solid behavior, and then you'd have to have two sets of objects for player and enemy collisions, which could then be separately disabled.

Either way, the Platform behavior has some of the most complex code in the engine, so I doubt this will be straightforward.

@ashley Fair enough, my wording wasn't probably the finest! I think it can be described as simply "per individual instance of any object, can we disable it's interaction and reactions to solid objects" rather than changing the solid's interaction with everyone else. I definitely think the closest would be "disable solid for this instance only" but I know @ruskul and @JackieChan had some ideas on this, and JC described the request as "It would be great to have a "ignore collision with selected solid" feature in construct 2 that would work with all behaviors".

Does my example give any clear indication as to what I kinda need?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest