Scirra / Construct-feature-requests

A place to submit feature requests and suggestions for Construct.
https://www.construct.net
10 stars 1 forks source link

Sprite new collider option #142

Open SnipG opened 6 months ago

SnipG commented 6 months ago

Reviewed guidelines

Checked for duplicate suggestions

Summary

Currently there is polygon collider for sprite, which has a lot of limitations in some cases. I suggest new collider option, which user can enable: Optimized grid collision.

Because it works as quad collision system, it should work with everything else inside C3 collision system engine.

Possible workarounds or alternatives

There are no usable workaround.

Proposed solution

Currently sprite collision is polygon based, something like this: iscool User can't modifie it easily. User can't cut polygon into 2 separated areas or even 3 or 4 collision areas inside single sprite. User can't make holes inside collision area.

Iam suggesting grid based collisions, which user can enable, something like this and it works with sprite at any angle: iscool2

This adds whole new ability to do collision with sprite, which where not possible before.

Like cut or make holes in collision area: iscool3 iscool5

This will add ability to create or delete collision areas inside sprite at runtime.

User should be able to:

Why is this idea important?

It adds whole new core functionality, ability to do collisions in new way and ability to use it with main object sprite.

Its worth to have more way to do collision then single polygon area inside sprite. Which user can't even change easily.

Additional remarks

It could easily be made as separated object then sprite and user can connect it to sprite. If edge cases to consider, while developing it for sprite are way too difficult.

WilsonPercival commented 6 months ago

You mean pixel-by-pixel collision. That's exactly how it worked in Construct Classic. By the way, it’s interesting to hear why Construct 3 doesn’t have this collision method.

SnipG commented 6 months ago

I never tried Contrust Classic, i don't know how it was working there. But if grid is defined as 1x1, then it could work something like pixel by pixel collision. If you define tilemap to 1x1 and use collision only, it does work. So proof of concept works, so it just needs ability to be added to sprite and do what sprite does.

Currently we have polygon collisions only. And with mesh you can modifie it, but it's still limiting. New grid collision for sprite would be nice new addon.