Collision not working on Sprite Grouping Component when it moves

I’ve created a sprite grouping component with collision which seems to properly follow sprite collision rules when not moving.

However, when moving the sprite grouping component using Set Relative Location it fails to collide against another sprite grouping component.

Red + Black tiles should collide, white tiles can be passed through.

Demonstration: - YouTube

Sprite collisions don’t seem to be working either. I placed a paper2d sprite within my blueprint and used Set World Location until it passed over another sprite with collision enabled and nothing seemed to happen. Both sprites are set to block all and I can literally see the collision boxes overlapping.

Hi Distul -

Thank you for your report. We have assigned this issue to a member of our support staff, and they will begin investigation as soon as possible. If we are unable to reproduce the issue, or we need additional information, our staff member will comment here with additional questions. Otherwise, we will post an ‘Answer’ once we have logged the issue in our bug database or we have a solution for it.

In the meantime, please be sure to review our suggestions for how to report a bug, and feel free to edit your post if you have additional information to provide:

Thank you -

Eric Ketchum

Hey Distul,

Would you mind showing me some screenshots of your sprite grouping blueprint so I can get an idea of how you are putting this together?

Just a hunch, but make sure the sprites you want to collide are at the say Y-depth in your scene. Also take a look at the Paper 2D Collision documentation so you can have a better understanding of how 2d collision works in a three dimensional project.

Sprite Collision

Regards,

It might be easier just to give you the whole project. It’s under 1mb at the moment.

http://projectf.22web.org/backtobasics.zip

Mirror (preferred): https://drive.google.com/file/d/0B9stmeshmXZmeWlLUzQxbGVIaEk/view?usp=sharing

I’m using 3D collision because it’s going to be a mobile project and if I recall 2D is not yet supported on Android.

Hello Andrew,

Have you been able to determine if the error was engine or user made?

I also can’t seem to change the material type on this component either. I don’t want to make a ton of bug submissions being that it’s still in development.

Hey Distul,

I attempted to pinpoint the reason for your issue and could not find a solution. I have looped in some other engineers who will be able to shed some light on the current status of the ‘Grouped Sprite Component’ that was recently added and how collision is accounted for. Myself or another engineer will report back when we have more information.

Thank you,

Thanks.

Another issue that I’m not sure if ‘working as intended’ is gravity with actors spawned within my bpGenerator blueprint(the blueprint with the sprite groups). Whenever using Spawn Actor to create a Paper2D Character gravity seems to be non-existent. The actor just sits in space. When manually placing actor outside of bpGenerator gravity works fine.

Hey Distul,

Before troubleshooting, type ‘ShowFlag.Collision 1’ into the console command prompt. This will show the collision for your Grouped sprite components. I was given some information and wanted to pass it along.

SetRelativeLocation takes a bool indicating whether or not it should sweep. If false, then it teleports the actor and it can totally interpenetrate with other actors. If true it should do a collision sweep towards the target point and stop if there is a collision.

Collision does work with these components, your set up just has some incorrect or missing logic. I would suggest re-creating your blueprint from scratch and moving step by step checking to make sure your collision works with each addition or iteration.

As for your second issue, this deals with physics and is a different issue entirely. We ask users to post an answerhub post for their different issues so it is easier to track no only for ourselves, but for other users who are experiencing similar issues.

Thank you,

Andrew,

All settings have been reset to default and sweep has been ticked, collision still isn’t working. Collision doesn’t seem to be working with the blueprints own components or other blueprints. Collision mode is set to Block All.

Both the paper flipbook character and black blocks should collide.

Video: - YouTube

I created a new project and tried again. I received the same results.

Moving TopSprites even with sweep ticked generated no blocking or overlapping.

BottomSprites blocked a capsule component fine, but were not moving. The issue seems to be directly related with moving

Hey Distul,

I just ran a simple test using the event graph logic you provided within the level blueprint of a blank 2d project. Not using the new GroupedSpriteComponent feature within its own blueprint, I was able to get collision to work as expected. I was also able to get collision to work with the PaperCharacter_Blueprint. The documentation suggests using a capsule component as this is inherited with the default character class along with the movement component.

I suggest taking a look at the Paper 2d and Sprite Collision documentation as there are different ways collision can be accounted for when using sprites and 2d graphics.

Sprite Collision

Some things to keep in mind as well, the grouped sprite component you are using was recently added in 4.8 and uses an early access class. This means the feature is not quite production ready and is added as a preview of things to come.

The test I ran with your logic was fairly straight forward. I simply set the target location of the top platform to move to the bottom platform. I placed one in between them to see if it would collide.

2D Collision Test

For now, I suggest using a non-early access class and wait until the grouped sprite component is production ready. I would also take a look at the Paper 2d documentation and Content Examples to gain a further understanding of how Paper 2d functions as a game type.

Regards,

Yes, the normal sprite collision works fine. The sprite group collision does not. So it seems to be there is still a ‘bug’ with the sprite group collision.

I do understand though that it’s an early access class so I moved along to attaching my sprites to place holder component and that seems to work fine.