GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

New extension: <3D_Physics>

Open github-actions[bot] opened this issue 11 months ago • 13 comments

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

  • [X] I've followed all of the best practices.
  • [X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • [X] 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[bot] avatar Mar 17 '24 20:03 github-actions[bot]

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

github-actions[bot] avatar Mar 22 '24 14:03 github-actions[bot]

!update Physics3D.json

TheAvIGOLD avatar Mar 22 '24 14:03 TheAvIGOLD

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

github-actions[bot] avatar Mar 22 '24 14:03 github-actions[bot]

!update Physics3D.zip

TheAvIGOLD avatar Mar 22 '24 14:03 TheAvIGOLD

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.

github-actions[bot] avatar Mar 22 '24 14:03 github-actions[bot]

!update Physics3D.zip

TheAvIGOLD avatar Mar 22 '24 14:03 TheAvIGOLD

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.

github-actions[bot] avatar Mar 22 '24 14:03 github-actions[bot]

@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

tristanbob avatar Mar 22 '24 17:03 tristanbob

!update Physics3D.zip

TheAvIGOLD avatar Mar 23 '24 20:03 TheAvIGOLD

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.

github-actions[bot] avatar Mar 23 '24 20:03 github-actions[bot]

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?

D8H avatar Mar 30 '24 11:03 D8H

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 avatar Apr 11 '24 13:04 TheAvIGOLD

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

TheAvIGOLD avatar Apr 11 '24 13:04 TheAvIGOLD