Bug Issue: Assigning a shape to a different collision group other than the actor's default


Pages: 1

DJEmergency

  • Level 2 Stencyler
November 10, 2016, 12:17:00 am
Detecting collisions with a collision shape from a different group outside of the actor's default does nothing.

Steps to reproduce..

1. Create an actor and leave the default collision for it.
2. Edit the collisions for the actor, create a new collision and add it to a different group.
3. Make a new collision event to detect the group for collision.
4. Add a test event (anything).
5. Test.
« Last Edit: November 10, 2016, 12:19:06 am by DJEmergency »


New attachment added by DJEmergency - November 10, 2016, 12:28:12 am


DJEmergency

  • Level 2 Stencyler
November 10, 2016, 02:20:48 pm
Works:

Actor's collision properties: Enemies
Collision box properties: Enemies

Broken:

Actor's collision properties: Actor
Collision box properties: Enemies
« Last Edit: November 10, 2016, 02:24:10 pm by DJEmergency »


New attachment added by DJEmergency - November 10, 2016, 02:49:50 pm


New attachment added by DJEmergency - November 10, 2016, 02:54:53 pm


DJEmergency

  • Level 2 Stencyler
November 10, 2016, 02:55:15 pm
Sorry about the first two images. The latest one is the example.
« Last Edit: November 10, 2016, 02:55:48 pm by DJEmergency »


New attachment added by DJEmergency - November 10, 2016, 02:58:59 pm


Issue updated by Hectate - November 10, 2016, 03:13:25 pm
  • Status changed from New to Confirmed


Hectate

  • Master Stencyler
  • *
November 10, 2016, 03:16:58 pm
Successfully confirmed this behavior and traced it back to Actor.hx (line 2225), with the issue somewhat actually caused by the collision listener function itself. Line 2225 returns the Actor's body's groupID. We never check to see if the actor has *multiple groups* as a result of multiple shapes. Especially telling since we're testing against the actor and never the shape.

I think we should probably get the groupID for the shape and not use Actor.getGroupID():Int at all.

Edit: line 2224, forgot i added a trace  :o

Double Edit: I should really clarify, that the issue is with the code generated by the event block presumes that getting the actor's group is sufficient.
Example:
Code: [Select]
/* ======================= Member of Group ======================== */
addCollisionListener(actor, function(event:Collision, list:Array<Dynamic>):Void
{
if(wrapper.enabled && sameAsAny(getActorGroup(4),event.otherActor.getType(),event.otherActor.getGroup()))
{
trace("" + "Detected hit on GROUP of Enemies");
}
});
« Last Edit: November 10, 2016, 03:22:20 pm by Hectate »


DJEmergency

  • Level 2 Stencyler
January 30, 2017, 03:07:59 am
Any update on this?


Issue updated by Justin - January 31, 2017, 12:05:57 pm
  • Version changed from Stencyl 3.4, 3.4.0 beta, 3.4.0 beta2, 3.4.0 beta3, 3.4.0 beta4, 3.4.0 beta5 to Stencyl 3.4


DJEmergency

  • Level 2 Stencyler
February 27, 2017, 06:09:05 pm
This issue still exists.. What's the ETA on this?


rob1221

  • Master Stencyler
  • *
February 28, 2017, 07:43:06 am
I think there is value in having an actor being set to a separate group rather than being forced into every group of its collision shapes which is what you're suggesting.  If you want to check the collision shape of a group different than the actor's group, there are other options for that.  For example you can use the generic collision event and inside that use the "group for actor colliding shape" block to check against any collision shape of the actor.


Justin

  • Master Stencyler
  • *
February 15, 2019, 01:45:34 am
Yeah, the event here says "actor of group", so we can take that to mean the group of the actor itself, not individual shapes.
  • Status changed from Confirmed to Closed


Pages: 1

Details

  • Reported
    November 10, 2016, 12:17:00 am
  • Updated
    February 15, 2019, 01:45:34 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Closed
  • Priority
    Normal
  • Version
    Stencyl 3.4
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Collision Groups

Tags


Attachments


* screencap.png (288.73 kB, 892x679 - viewed 133 times.)

* example.png (579.35 kB, 952x201 - viewed 117 times.)

* example.png (579.56 kB, 952x201 - viewed 115 times.)

* example.png (579.59 kB, 952x201 - viewed 120 times.)