Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision Between 3D Objects extension #1048

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 9, 2023

Description

This extensions checks for collisions between 3d objects as condition and returns true if they are colliding.

How to use the extension

Check the collision of 3D Objects and returns true if they are colliding so you can act accordingly like separate two objects action etc.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Reviewed

Example file

CollisionBetween3DObjectsExample.zip

Extension file

CollisionBetween3DObjects.zip

EDIT: Added more information on description on the usage, limitations and examples of the extension.

@github-actions github-actions bot requested a review from a team as a code owner October 9, 2023 20:00
@github-actions github-actions bot added the ✨ New extension A new extension label Oct 9, 2023
@D8H
Copy link
Contributor

D8H commented Oct 10, 2023

Thank you for submitting an extension.

I guess intervals intersection can be checked with a simpler formula like this one: aMin < bMax and aMax > bMin

I have some concerns:

  • It won't work for 3D models because of custom origin.
    • but maybe it's fine to only use boxes, I guess it could be seen as the 3D hit-box, maybe some sort of 3D sticker extension would help.
  • It won't work for boxes rotated around y or x.
    • it could be ok with a different wording like "Intersect on Z", walls are probably only rotated on Z.
  • I don't know how much a collision check is useful without a separate action.
    • If the action doesn't check X and Y, I guess it solve the issue.

Is the use case to check collision with walls on several floors?

@VanCastar
Copy link

I have some concerns:

* It won't work for 3D models because of custom origin.

I've added a notification on the description that to have proper 3d Model collision working the origin should be set on bottom middle of the object.

  * but maybe it's fine to only use boxes, I guess it could be seen as the 3D hit-box, maybe some sort of 3D sticker extension would help.

I added also a notification to use hidden 3d boxes as collision boxes as done sometimes with 2d Sprites.

* It won't work for boxes rotated around y or x.
  * it could be ok with a different wording like "Intersect on Z", walls are probably only rotated on Z.

This is true, I added a notification to keep the models upright rotated only on Z-axis and a use case examples.

* I don't know how much a collision check is useful without a separate action.

This is great for checking if the separate action is needed.
Also to identify objects you have bumped into (like to open doors, or move furniture for example).
I also use this to

  * If the action doesn't check X and Y, I guess it solve the issue.

It doesn't check for X/Y inside the extension but the 2d collision and then if the object are colliding on z-axis at any part.

Is the use case to check collision with walls on several floors?
Yes exactly this among others(Floors, walls, pillars, stairs, furniture, obstacles, doors, enemies on multiple floors.)
I added an example explanation to the description for the use case.

@github-actions github-actions bot force-pushed the extension/VanCastar/1047 branch from c292571 to 7459fd0 Compare October 12, 2023 06:52
@D8H
Copy link
Contributor

D8H commented Oct 12, 2023

  • If the action doesn't check X and Y, I guess it solve the issue.

It doesn't check for X/Y inside the extension but the 2d collision and then if the object are colliding on z-axis at any part.

My suggestion was to have a condition "BoxA intersect on Z with BoxB", "BoxA is on the same Z level as BoxB" or another wording to make it clear that it's only a naive checks of on Z positions and not a real collision detection.
People would use it next to the 2D collision condition or the 2D separate action according to what they want to do.

@VanCastar VanCastar mentioned this pull request Oct 13, 2023
3 tasks
@github-actions github-actions bot mentioned this pull request Oct 13, 2023
3 tasks
@VanCastar
Copy link

This extension is included in the collection of extensions called ToolsFor3D in #1050

@D8H D8H mentioned this pull request Jan 21, 2024
@D8H
Copy link
Contributor

D8H commented Jan 21, 2024

I credited you on this extension:

If you have time to test it, please tell me if you see improvements that could be made.

@VanCastar
Copy link

I credit you on this extension:

* [[Community] 3D jump #1145](https://github.com/GDevelopApp/GDevelop-extensions/pull/1145)

I you have time to test it, please tell me if you see improvements that could be made.

I'll take a look at it later this evening...

@D8H
Copy link
Contributor

D8H commented Feb 4, 2024

I also credited you on this extension:

If you have time to test it, please tell me if you see improvements that could be made.

@D8H
Copy link
Contributor

D8H commented Mar 19, 2024

Since the other extension was merged, I'm closing this PR.
Feel free to open it back if you still want to continue working on this extension.

@D8H D8H closed this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ New extension A new extension
Projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

2 participants