Skip to content

Commit d2a9a73

Browse files
authored
[Reviewed] [3D particles] Fix the rotation around X axis to be the other way (#1724)
1 parent ec7bfcc commit d2a9a73

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

extensions/reviewed/ParticleEmitter3D.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "ParticleEmitter3D",
1010
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg",
1111
"shortDescription": "Display a large number of particles in 3D to create visual effects in a 3D game.",
12-
"version": "2.2.0",
12+
"version": "3.0.0",
1313
"description": [
1414
"3D particle emitters let you create and display many small particles to simulate visual effects in your game — like fire, explosions, smoke, or dust.",
1515
"",
@@ -34,6 +34,10 @@
3434
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2"
3535
],
3636
"changelog": [
37+
{
38+
"version": "3.0.0",
39+
"breaking": "- the object rotates the other way around X axis."
40+
},
3741
{
3842
"version": "2.0.0",
3943
"breaking": "- Object properties for position and rotation have been removed. They must be set with the instance editor or the action."
@@ -77,9 +81,7 @@
7781
" const threeObject3D = this.get3DRendererObject();",
7882
"",
7983
" threeObject3D.rotation.set(",
80-
" // TODO The rotation on X goes the wrong way.",
81-
" // Increment the major and remove this sign.",
82-
" - gdjs.toRad(this._object.getRotationX()),",
84+
" gdjs.toRad(this._object.getRotationX()),",
8385
" gdjs.toRad(this._object.getRotationY()),",
8486
" gdjs.toRad(this._object.angle)",
8587
" );",
@@ -6993,6 +6995,15 @@
69936995
"",
69946996
"/** @type {gdjs.CustomRuntimeObject} */",
69956997
"const object = objects[0];",
6998+
"// Force the size of the object because it doesn't contain any instance.",
6999+
"object._innerArea = {",
7000+
" min: [-16, -16, -16],",
7001+
" max: [16, 16, 16],",
7002+
" };",
7003+
"const hitbox = new gdjs.Polygon();",
7004+
"hitbox.vertices = [[-16, -16], [16, -16], [16, 16], [-16, 16]];",
7005+
"object._untransformedHitBoxes = [hitbox];",
7006+
"object._updateUntransformedHitBoxes = () => {};",
69967007
"",
69977008
"// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.",
69987009
"const gameScene = object.getRuntimeScene();",

scripts/lib/ExtensionsValidatorExceptions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ const extensionsAllowedProperties = {
390390
'CustomRuntimeObject3DRenderer',
391391
'CustomRuntimeObject3D',
392392
'SpriteAnimationData',
393+
'Polygon',
393394
],
394395
gdjsEvtToolsAllowedProperties: [],
395396
runtimeSceneAllowedProperties: ['__particleEmmiter3DExtension'],

0 commit comments

Comments
 (0)