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

New extension: <3D_Physics> #1223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

github-actions[bot]
Copy link
Contributor

Description

An extension adding 3D physics for models

How to use the extension

The extension allows adding 3D physics to models. To use it, add the physics behavior to the desired object, configure its physical parameters such as mass, friction, restitution, etc., then add shapes for collision handling in the actions.

Types of shapes available:

  • Box
  • Sphere
  • Cylinder
  • Capsule

The extension also provides:

  • Impulse and force for pushing objects
  • Joins for connecting physical bodies
  • Sleep mode for optimization and manual suspension of physics calculation for an object
  • Collision checking between two objects

Controls:
Add a separate behavior to the player, then in the actions, set the movement force and direction, and the jump force.

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?

Community (Unreviewed)

Example file

3D_Physics_Template.zip

Extension file

Physics3D.zip

@github-actions github-actions bot added the ✨ New extension A new extension label Mar 17, 2024
@github-actions github-actions bot requested a review from a team as a code owner March 17, 2024 20:34
@github-actions github-actions bot added this to Needs review in Extensions review Mar 17, 2024
@github-actions github-actions bot mentioned this pull request Mar 17, 2024
3 tasks
@VegeTato VegeTato added the 👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. label Mar 22, 2024
Copy link
Contributor Author

❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/8392063336.

@TheAvIGOLD
Copy link

!update Physics3D.json

Copy link
Contributor Author

❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/8392094637.

@TheAvIGOLD
Copy link

!update Physics3D.zip

Copy link
Contributor Author

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'Physics3D':

  ⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'Physics3D':
{
  allowedProperties: [
    'getVariables',
    'getLayer',
    'getGame',
    'getBackgroundColor',
    'getName',
    'createObject',
    'createObjectsFrom',
    'setBackgroundColor',
    'sceneJustResumed',
    'requestChange',
    'hasLayer',
    'enableDebugDraw'
  ],
  disallowedProperty: '__physics3D',
  objectName: 'runtimeScene'
}
{
  allowedProperties: [
    'getVariables',
    'getLayer',
    'getGame',
    'getBackgroundColor',
    'getName',
    'createObject',
    'createObjectsFrom',
    'setBackgroundColor',
    'sceneJustResumed',
    'requestChange',
    'hasLayer',
    'enableDebugDraw'
  ],
  disallowedProperty: '__CannonJS',
  objectName: 'runtimeScene'
}


❌ 1 Error found in extensions - please fix it before generating the registry.

@TheAvIGOLD
Copy link

!update Physics3D.zip

Copy link
Contributor Author

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'Physics3D':

  ⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'Physics3D':
{
  allowedProperties: [
    'getVariables',
    'getLayer',
    'getGame',
    'getBackgroundColor',
    'getName',
    'createObject',
    'createObjectsFrom',
    'setBackgroundColor',
    'sceneJustResumed',
    'requestChange',
    'hasLayer',
    'enableDebugDraw'
  ],
  disallowedProperty: '__physics3D',
  objectName: 'runtimeScene'
}
{
  allowedProperties: [
    'getVariables',
    'getLayer',
    'getGame',
    'getBackgroundColor',
    'getName',
    'createObject',
    'createObjectsFrom',
    'setBackgroundColor',
    'sceneJustResumed',
    'requestChange',
    'hasLayer',
    'enableDebugDraw'
  ],
  disallowedProperty: '__CannonJS',
  objectName: 'runtimeScene'
}


❌ 1 Error found in extensions - please fix it before generating the registry.

@tristanbob
Copy link
Contributor

@TheAvIGOLD to get that test to pass, you need to add __physics3D and __CannonJS to allowedProperties
inside /scripts/lib/ExtensionsValidatorExceptions.js.

https://github.com/GDevelopApp/GDevelop-extensions/blob/main/scripts/lib/ExtensionsValidatorExceptions.js

@TheAvIGOLD
Copy link

!update
Physics3D.zip

Copy link
Contributor Author

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'Physics3D':

  ⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'Physics3D':
{
  allowedProperties: [
    'getVariables',
    'getLayer',
    'getGame',
    'getBackgroundColor',
    'getName',
    'createObject',
    'createObjectsFrom',
    'setBackgroundColor',
    'sceneJustResumed',
    'requestChange',
    'hasLayer',
    'enableDebugDraw'
  ],
  disallowedProperty: '__physics3D',
  objectName: 'runtimeScene'
}
{
  allowedProperties: [
    'getVariables',
    'getLayer',
    'getGame',
    'getBackgroundColor',
    'getName',
    'createObject',
    'createObjectsFrom',
    'setBackgroundColor',
    'sceneJustResumed',
    'requestChange',
    'hasLayer',
    'enableDebugDraw'
  ],
  disallowedProperty: '__CannonJS',
  objectName: 'runtimeScene'
}


❌ 1 Error found in extensions - please fix it before generating the registry.

@D8H
Copy link
Contributor

D8H commented Mar 30, 2024

Thank you for submitting an extension.

We plan to create an extension directly in GDevelop using the Jolt physics engine in the near future.
Do you still want a review of this extension?

@TheAvIGOLD
Copy link

Thank you for submitting an extension.

We plan to create an extension directly in GDevelop using the Jolt physics engine in the near future. Do you still want a review of this extension?

I think this extension can be an alternative to your extension. Just point out that this extension use Cannon JS engine.

@TheAvIGOLD
Copy link

Physics3D.zip
When reviewing the extension, please use the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. ✨ New extension A new extension
Projects
Extensions review
  
Needs review
Development

Successfully merging this pull request may close these issues.

None yet

4 participants