From 9a60a87a2c00a5ba27e9ae02e0b2bc985d7a7031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 21 Jun 2026 17:32:48 +0200 Subject: [PATCH 1/4] [3D physics airplane] Simulate an airplane using the 3D physics --- extensions/community/PhysicsAirplane3D.json | 3184 +++++++++++++++++ .../PhysicsAirplane3DGamepadMapper.json | 395 ++ .../PhysicsAirplane3DMultitouchMapper.json | 403 +++ .../reviewed/SpriteMultitouchJoystick.json | 697 +++- 4 files changed, 4666 insertions(+), 13 deletions(-) create mode 100644 extensions/community/PhysicsAirplane3D.json create mode 100644 extensions/community/PhysicsAirplane3DGamepadMapper.json create mode 100644 extensions/community/PhysicsAirplane3DMultitouchMapper.json diff --git a/extensions/community/PhysicsAirplane3D.json b/extensions/community/PhysicsAirplane3D.json new file mode 100644 index 000000000..e1fd57fb7 --- /dev/null +++ b/extensions/community/PhysicsAirplane3D.json @@ -0,0 +1,3184 @@ +{ + "author": "", + "category": "Movement", + "dimension": "3D", + "extensionNamespace": "", + "fullName": "3D physics airplane", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjEzLDE4IDIxLDE4IDEyLDI4IDgsMjggIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMC4yLDE0IDEzLDYgOSw2IDEzLDE0ICIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyLDIwSDRMMSw5aDNsNCw1SDI4YzAuOCwwLDEuNiwwLjMsMi4xLDAuOWwwLDBjMS4yLDEuMiwxLjIsMy4xLDAsNC4ybDAsMEMyOS41LDE5LjcsMjguOCwyMCwyOCwyMGgtOC44Ii8+DQo8L3N2Zz4NCg==", + "name": "PhysicsAirplane3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Vehicles and Transport/49e91b8e69b677706be23ab4f1ca25d6771c0312e5f77dc1d93f95e7afa396b0_Vehicles and Transport_airplane_air_plane_fly.svg", + "shortDescription": "Simulate an airplane using the 3D physics.", + "version": "1.0.0", + "description": "Simulate an airplane with simple physics. The airplane can go in any direction and spin back to level with the horizon when players release direction keys.", + "tags": [ + "3d" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Turn the object around its local X axis.", + "fullName": "Turn around local X axis", + "functionType": "Action", + "group": "Angle", + "name": "TurnX", + "private": true, + "sentence": "Turn _PARAM1_ of _PARAM3_° around its local X axis", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.RuntimeObject3D} */", + "const object = objects[0];", + "/** @type {number} */", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "", + "if (angle === 0) {", + " return;", + "}", + "const threeObject = object.get3DRendererObject();", + "threeObject.rotateX(gdjs.toRad(angle));", + "", + "const rotationX = gdjs.toDegrees(threeObject.rotation.x);", + "const rotationY = gdjs.toDegrees(threeObject.rotation.y);", + "const rotationZ = gdjs.toDegrees(threeObject.rotation.z);", + "// These methods overrides threeObject.rotation", + "object.setRotationX(rotationX);", + "object.setRotationY(rotationY);", + "object.setAngle(rotationZ);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "Angle (in degrees)", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Turn the object around its local Y axis.", + "fullName": "Turn around local Y axis", + "functionType": "Action", + "group": "Angle", + "name": "TurnY", + "private": true, + "sentence": "Turn _PARAM1_ of _PARAM3_° around its local Y axis", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.RuntimeObject3D} */", + "const object = objects[0];", + "/** @type {number} */", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "", + "if (angle === 0) {", + " return;", + "}", + "const threeObject = object.get3DRendererObject();", + "threeObject.rotateY(gdjs.toRad(angle));", + "", + "const rotationX = gdjs.toDegrees(threeObject.rotation.x);", + "const rotationY = gdjs.toDegrees(threeObject.rotation.y);", + "const rotationZ = gdjs.toDegrees(threeObject.rotation.z);", + "// These methods overrides threeObject.rotation", + "object.setRotationX(rotationX);", + "object.setRotationY(rotationY);", + "object.setAngle(rotationZ);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "Angle (in degrees)", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Turn the object around its local Z axis.", + "fullName": "Turn around local Z axis", + "functionType": "Action", + "group": "Angle", + "name": "TurnZ", + "private": true, + "sentence": "Turn _PARAM1_ of _PARAM3_° around its local Z axis", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.RuntimeObject3D} */", + "const object = objects[0];", + "/** @type {number} */", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "", + "console.log(angle);", + "if (angle === 0) {", + " return;", + "}", + "const threeObject = object.get3DRendererObject();", + "threeObject.rotateZ(gdjs.toRad(angle));", + "", + "const rotationX = gdjs.toDegrees(threeObject.rotation.x);", + "const rotationY = gdjs.toDegrees(threeObject.rotation.y);", + "const rotationZ = gdjs.toDegrees(threeObject.rotation.z);", + "// These methods overrides threeObject.rotation", + "object.setRotationX(rotationX);", + "object.setRotationY(rotationY);", + "object.setAngle(rotationZ);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + }, + { + "description": "Angle (in degrees)", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Angle", + "children": [ + { + "functionName": "TurnX" + }, + { + "functionName": "TurnY" + }, + { + "functionName": "TurnZ" + } + ] + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "Simulate an airplane using the 3D physics.", + "fullName": "3D physics airplane", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsAirplane3D", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForwardSpeed", + "=", + "ForwardSpeedMin" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TimeDelta", + "=", + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AcceleratorInput", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForwardSpeed", + "=", + "clamp(CurrentForwardSpeed + AcceleratorInput * ForwardAcceleration * TimeDelta, ForwardSpeedMin, ForwardSpeedMax)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AcceleratorInput", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForwardSpeed", + "=", + "clamp(CurrentForwardSpeed - ForwardDeceleration * TimeDelta, ForwardSpeedMin, ForwardSpeedMax)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The splin animation is reverted for the movement calculus because it affects how the plane turn around its local Y and Z axis." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::TurnX" + }, + "parameters": [ + "Object", + "Object", + "Object3D", + "-CurrentSpin", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentHorizontalAngularSpeed", + "=", + "TurnHorizontallyInput * HorizontalAngularSpeedMax" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentVerticalAngularSpeed", + "=", + "TurnVerticallyInput * VerticalAngularSpeedMax" + ] + }, + { + "type": { + "value": "PhysicsAirplane3D::TurnZ" + }, + "parameters": [ + "Object", + "Object", + "Object3D", + "CurrentHorizontalAngularSpeed * TimeDelta", + "" + ] + }, + { + "type": { + "value": "PhysicsAirplane3D::TurnY" + }, + "parameters": [ + "Object", + "Object", + "Object3D", + "CurrentVerticalAngularSpeed * TimeDelta", + "" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityX" + }, + "parameters": [ + "Object", + "Physics3DBehavior", + "=", + "CurrentForwardSpeed * Object.Object3D::ForwardX()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityY" + }, + "parameters": [ + "Object", + "Physics3DBehavior", + "=", + "CurrentForwardSpeed * Object.Object3D::ForwardY()" + ] + }, + { + "type": { + "value": "Physics3D::Physics3DBehavior::SetLinearVelocityZ" + }, + "parameters": [ + "Object", + "Physics3DBehavior", + "=", + "CurrentForwardSpeed * Object.Object3D::ForwardZ()" + ] + }, + { + "type": { + "value": "PhysicsAirplane3D::TurnX" + }, + "parameters": [ + "Object", + "Object", + "Object3D", + "CurrentSpin", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Level back the wings", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentHorizontalAngularSpeed", + "=", + "0" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentVerticalAngularSpeed", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Object", + "Object3D", + "=", + "AngleDifference(Object.Object3D::RotationX(), 0)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ForceFeedbackSpinSpeed", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForceFeedbackSpinSpeed", + "=", + "abs(Object.Object3D::RotationX() / ForceFeedbackSpinDuration)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Scene3D::Base3DBehavior::RotationX" + }, + "parameters": [ + "Object", + "Object3D", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Object", + "Object3D", + "=", + "min(0, Object.Object3D::RotationX() + ForceFeedbackSpinSpeed * TimeDelta)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Scene3D::Base3DBehavior::RotationX" + }, + "parameters": [ + "Object", + "Object3D", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationX" + }, + "parameters": [ + "Object", + "Object3D", + "=", + "max(0, Object.Object3D::RotationX() - ForceFeedbackSpinSpeed * TimeDelta)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpin", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentSpin", + "=", + "min(0, CurrentSpin + ForceFeedbackSpinSpeed * TimeDelta)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpin", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentSpin", + "=", + "max(0, CurrentSpin - ForceFeedbackSpinSpeed * TimeDelta)" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Spin the wings to match rotation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentHorizontalAngularSpeed", + "!=", + "0" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentVerticalAngularSpeed", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForceFeedbackSpinSpeed", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TargetedSpin", + "=", + "-SpinMax * CurrentHorizontalAngularSpeed / HorizontalAngularSpeedMax" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpin", + "<", + "TargetedSpin" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Delta", + "=", + "min(CurrentSpin + SpinSpeed * TimeDelta, TargetedSpin) - CurrentSpin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpin", + ">", + "TargetedSpin" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Delta", + "=", + "max(CurrentSpin - SpinSpeed * TimeDelta, TargetedSpin) - CurrentSpin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentSpin", + "+", + "Delta" + ] + }, + { + "type": { + "value": "PhysicsAirplane3D::TurnX" + }, + "parameters": [ + "Object", + "Object", + "Object3D", + "Delta", + "" + ] + } + ] + } + ], + "variables": [ + { + "name": "Delta", + "type": "number", + "value": 0 + }, + { + "name": "TargetedSpin", + "type": "number", + "value": 0 + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "variables": [ + { + "name": "TimeDelta", + "type": "number", + "value": 0 + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnHorizontallyInput", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnVerticallyInput", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratorInput", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate a press of the turn right key.", + "fullName": "Simulate turn right key press", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateTurnRightKey", + "sentence": "Simulate pressing turn right key for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnHorizontallyInput", + "=", + "1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate a press of the turn left key.", + "fullName": "Simulate turn left key press", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateTurnLeftKey", + "sentence": "Simulate pressing turn left key for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnHorizontallyInput", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate a press of the move up key.", + "fullName": "Simulate turn up key press", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateTurnUpKey", + "sentence": "Simulate pressing turn up key for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnVerticallyInput", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate a press of the move down key.", + "fullName": "Simulate turn down key press", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateTurnDownKey", + "sentence": "Simulate pressing turn down key for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnVerticallyInput", + "=", + "1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate a press of the accelerator key.", + "fullName": "Simulate accelerator key press", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateAcceleratorKey", + "sentence": "Simulate pressing Accelerator key for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratorInput", + "=", + "1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate an accelerator stick control.", + "fullName": "Simulate accelerator stick control", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateAcceleratorStick", + "sentence": "Simulate an accelerator stick control for _PARAM0_ with a _PARAM2_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratorInput", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + }, + { + "description": "Force (-1 to 1)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate turn horizontally stick control.", + "fullName": "Simulate turn horizontally stick control", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateTurnHorizontallyStick", + "sentence": "Simulate turn horizontally stick control for _PARAM0_ with a _PARAM2_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnHorizontallyInput", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + }, + { + "description": "Force (-1 to 1)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate turn vertically stick control.", + "fullName": "Simulate turn vertically stick control", + "functionType": "Action", + "group": "3D physics airplane state", + "name": "SimulateTurnVerticallyStick", + "sentence": "Simulate turn vertically stick control for _PARAM0_ with a _PARAM2_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TurnVerticallyInput", + "=", + "Value" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "Value", + "\"info\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + }, + { + "description": "Force (-1 to 1)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the current spin of the object.", + "fullName": "Current spin", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane state", + "name": "CurrentSpin", + "sentence": "the current spin", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurrentSpin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the current forward speed of the object.", + "fullName": "Current forward speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane state", + "name": "CurrentForwardSpeed", + "sentence": "the current forward speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurrentForwardSpeed" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "CurrentForwardSpeed", + "group": "3D physics airplane state", + "name": "SetCurrentForwardSpeed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForwardSpeed", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the current horizontal angular speed of the object.", + "fullName": "Current horizontal angular speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane state", + "name": "CurrentHorizontalAngularSpeed", + "sentence": "the current horizontal angular speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurrentHorizontalAngularSpeed" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "CurrentHorizontalAngularSpeed", + "group": "3D physics airplane state", + "name": "SetCurrentHorizontalAngularSpeed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentHorizontalAngularSpeed", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the current vertical angular speed of the object.", + "fullName": "Current vertical angular speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane state", + "name": "CurrentVerticalAngularSpeed", + "sentence": "the current vertical angular speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurrentVerticalAngularSpeed" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "CurrentVerticalAngularSpeed", + "group": "3D physics airplane state", + "name": "SetCurrentVerticalAngularSpeed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentVerticalAngularSpeed", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the horizontal max angular speed of the object.", + "fullName": "Horizontal max angular speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "HorizontalAngularSpeedMax", + "sentence": "the horizontal max angular speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "HorizontalAngularSpeedMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalAngularSpeedMax", + "group": "3D physics airplane configuration", + "name": "SetHorizontalAngularSpeedMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "HorizontalAngularSpeedMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the vertical max angular speed of the object.", + "fullName": "Vertical max angular speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "VerticalAngularSpeedMax", + "sentence": "the vertical max angular speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "VerticalAngularSpeedMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngularSpeedMax", + "group": "3D physics airplane configuration", + "name": "SetVerticalAngularSpeedMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "VerticalAngularSpeedMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the forward max speed of the object.", + "fullName": "Forward max speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "ForwardSpeedMax", + "sentence": "the forward max speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ForwardSpeedMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ForwardSpeedMax", + "group": "3D physics airplane configuration", + "name": "SetForwardSpeedMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForwardSpeedMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the forward min speed of the object.", + "fullName": "Forward min speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "ForwardSpeedMin", + "sentence": "the forward min speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ForwardSpeedMin" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ForwardSpeedMin", + "group": "3D physics airplane configuration", + "name": "SetForwardSpeedMin", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForwardSpeedMin", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the forward acceleration of the object.", + "fullName": "Forward acceleration", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "ForwardAcceleration", + "sentence": "the forward acceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ForwardAcceleration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ForwardAcceleration", + "group": "3D physics airplane configuration", + "name": "SetForwardAcceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForwardAcceleration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the forward deceleration of the object.", + "fullName": "Forward deceleration", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "ForwardDeceleration", + "sentence": "the forward deceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ForwardDeceleration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ForwardDeceleration", + "group": "3D physics airplane configuration", + "name": "SetForwardDeceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForwardDeceleration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the max spin of the object.", + "fullName": "Max spin", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "SpinMax", + "sentence": "the max spin", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpinMax" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SpinMax", + "group": "3D physics airplane configuration", + "name": "SetSpinMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SpinMax", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the spin speed of the object.", + "fullName": "Spin speed", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "SpinSpeed", + "sentence": "the spin speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpinSpeed" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "SpinSpeed", + "group": "3D physics airplane configuration", + "name": "SetSpinSpeed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SpinSpeed", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "3D physics airplane state", + "children": [ + { + "functionName": "SimulateTurnRightKey" + }, + { + "functionName": "SimulateTurnLeftKey" + }, + { + "functionName": "SimulateTurnUpKey" + }, + { + "functionName": "SimulateTurnDownKey" + }, + { + "functionName": "SimulateAcceleratorKey" + }, + { + "functionName": "SimulateAcceleratorStick" + }, + { + "functionName": "SimulateTurnHorizontallyStick" + }, + { + "functionName": "SimulateTurnVerticallyStick" + }, + { + "functionName": "CurrentSpin" + }, + { + "functionName": "CurrentForwardSpeed" + }, + { + "functionName": "SetCurrentForwardSpeed" + }, + { + "functionName": "CurrentHorizontalAngularSpeed" + }, + { + "functionName": "SetCurrentHorizontalAngularSpeed" + }, + { + "functionName": "CurrentVerticalAngularSpeed" + }, + { + "functionName": "SetCurrentVerticalAngularSpeed" + } + ] + }, + { + "folderName": "3D physics airplane configuration", + "children": [ + { + "functionName": "HorizontalAngularSpeedMax" + }, + { + "functionName": "SetHorizontalAngularSpeedMax" + }, + { + "functionName": "VerticalAngularSpeedMax" + }, + { + "functionName": "SetVerticalAngularSpeedMax" + }, + { + "functionName": "ForwardSpeedMax" + }, + { + "functionName": "SetForwardSpeedMax" + }, + { + "functionName": "ForwardSpeedMin" + }, + { + "functionName": "SetForwardSpeedMin" + }, + { + "functionName": "ForwardAcceleration" + }, + { + "functionName": "SetForwardAcceleration" + }, + { + "functionName": "ForwardDeceleration" + }, + { + "functionName": "SetForwardDeceleration" + }, + { + "functionName": "SpinMax" + }, + { + "functionName": "SetSpinMax" + }, + { + "functionName": "SpinSpeed" + }, + { + "functionName": "SetSpinSpeed" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, + { + "value": "", + "type": "Behavior", + "label": "3D physics engine", + "extraInformation": [ + "Physics3D::Physics3DBehavior" + ], + "choices": [], + "name": "Physics3DBehavior" + }, + { + "value": "0", + "type": "Number", + "unit": "PixelSpeed", + "label": "Current forward speed", + "hidden": true, + "name": "CurrentForwardSpeed" + }, + { + "value": "0", + "type": "Number", + "unit": "AngularSpeed", + "label": "Current horizontal angular speed", + "hidden": true, + "name": "CurrentHorizontalAngularSpeed" + }, + { + "value": "45", + "type": "Number", + "unit": "AngularSpeed", + "label": "Horizontal max angular speed", + "name": "HorizontalAngularSpeedMax" + }, + { + "value": "0", + "type": "Number", + "unit": "AngularSpeed", + "label": "Current vertical angular speed", + "hidden": true, + "name": "CurrentVerticalAngularSpeed" + }, + { + "value": "45", + "type": "Number", + "unit": "AngularSpeed", + "label": "Vertical max angular speed", + "name": "VerticalAngularSpeedMax" + }, + { + "value": "20", + "type": "Number", + "unit": "PixelSpeed", + "label": "Forward max speed", + "name": "ForwardSpeedMax" + }, + { + "value": "10", + "type": "Number", + "unit": "PixelSpeed", + "label": "Forward min speed", + "name": "ForwardSpeedMin" + }, + { + "value": "10", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Forward acceleration", + "name": "ForwardAcceleration" + }, + { + "value": "5", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Forward deceleration", + "name": "ForwardDeceleration" + }, + { + "value": "0", + "type": "Number", + "unit": "PixelSpeed", + "label": "Force feedback spin speed", + "hidden": true, + "name": "ForceFeedbackSpinSpeed" + }, + { + "value": "0.5", + "type": "Number", + "unit": "PixelSpeed", + "label": "Force feedback spin duration", + "description": "Spin back to level with the horizon when direction inputs are released. Can be set to 0 to disable it.", + "hidden": true, + "name": "ForceFeedbackSpinDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Current spin", + "hidden": true, + "name": "CurrentSpin" + }, + { + "value": "60", + "type": "Number", + "unit": "DegreeAngle", + "label": "Max spin", + "name": "SpinMax" + }, + { + "value": "120", + "type": "Number", + "unit": "AngularSpeed", + "label": "Spin speed", + "name": "SpinSpeed" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "AcceleratorInput" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "TurnHorizontallyInput" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "TurnVerticallyInput" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "Physics3DBehavior" + }, + { + "propertyName": "CurrentForwardSpeed" + }, + { + "propertyName": "CurrentHorizontalAngularSpeed" + }, + { + "propertyName": "HorizontalAngularSpeedMax" + }, + { + "propertyName": "CurrentVerticalAngularSpeed" + }, + { + "propertyName": "VerticalAngularSpeedMax" + }, + { + "propertyName": "ForwardSpeedMax" + }, + { + "propertyName": "ForwardSpeedMin" + }, + { + "propertyName": "ForwardAcceleration" + }, + { + "propertyName": "ForwardDeceleration" + }, + { + "propertyName": "ForceFeedbackSpinSpeed" + }, + { + "propertyName": "ForceFeedbackSpinDuration" + }, + { + "propertyName": "CurrentSpin" + }, + { + "propertyName": "SpinMax" + }, + { + "propertyName": "SpinSpeed" + }, + { + "propertyName": "AcceleratorInput" + }, + { + "propertyName": "TurnHorizontallyInput" + }, + { + "propertyName": "TurnVerticallyInput" + } + ] + } + }, + { + "description": "Control a 3D physics airplane with a keyboard.", + "fullName": "3D airplane keyboard mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsAirplane3DKeyboardMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "TurnUp" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnUpKey" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "TurnDown" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnDownKey" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "TurnRight" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnRightKey" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "TurnLeft" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnLeftKey" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Accelerator" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateAcceleratorKey" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the turn left key of the object.", + "fullName": "Turn left key", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane keyboard mapper", + "name": "TurnLeft", + "sentence": "the turn left key", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TurnLeft" + ] + } + ] + } + ], + "expressionType": { + "type": "keyboardKey" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TurnLeft", + "group": "3D physics airplane keyboard mapper", + "name": "SetTurnLeft", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TurnLeft", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the turn right key of the object.", + "fullName": "Turn right key", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane keyboard mapper", + "name": "TurnRight", + "sentence": "the turn right key", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TurnRight" + ] + } + ] + } + ], + "expressionType": { + "type": "keyboardKey" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TurnRight", + "group": "3D physics airplane keyboard mapper", + "name": "SetTurnRight", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TurnRight", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the turn up key of the object.", + "fullName": "Turn up key", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane keyboard mapper", + "name": "TurnUp", + "sentence": "the turn up key", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TurnUp" + ] + } + ] + } + ], + "expressionType": { + "type": "keyboardKey" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TurnUp", + "group": "3D physics airplane keyboard mapper", + "name": "SetTurnUp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TurnUp", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the turn down key of the object.", + "fullName": "Turn down key", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane keyboard mapper", + "name": "TurnDown", + "sentence": "the turn down key", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TurnDown" + ] + } + ] + } + ], + "expressionType": { + "type": "keyboardKey" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TurnDown", + "group": "3D physics airplane keyboard mapper", + "name": "SetTurnDown", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TurnDown", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the accelerator key of the object.", + "fullName": "Accelerator key", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane keyboard mapper", + "name": "Accelerator", + "sentence": "the accelerator key", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Accelerator" + ] + } + ] + } + ], + "expressionType": { + "type": "keyboardKey" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Accelerator", + "group": "3D physics airplane keyboard mapper", + "name": "SetAccelerator", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Accelerator", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3DKeyboardMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "3D physics airplane keyboard mapper", + "children": [ + { + "functionName": "TurnLeft" + }, + { + "functionName": "SetTurnLeft" + }, + { + "functionName": "TurnRight" + }, + { + "functionName": "SetTurnRight" + }, + { + "functionName": "TurnUp" + }, + { + "functionName": "SetTurnUp" + }, + { + "functionName": "TurnDown" + }, + { + "functionName": "SetTurnDown" + }, + { + "functionName": "Accelerator" + }, + { + "functionName": "SetAccelerator" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics airplane", + "extraInformation": [ + "PhysicsAirplane3D::PhysicsAirplane3D" + ], + "choices": [], + "name": "PhysicsAirplane3D" + }, + { + "value": "Right", + "type": "KeyboardKey", + "label": "Turn right key", + "name": "TurnRight" + }, + { + "value": "Left", + "type": "KeyboardKey", + "label": "Turn left key", + "name": "TurnLeft" + }, + { + "value": "Down", + "type": "KeyboardKey", + "label": "Turn up key", + "name": "TurnUp" + }, + { + "value": "Up", + "type": "KeyboardKey", + "label": "Turn down key", + "name": "TurnDown" + }, + { + "value": "LShift", + "type": "KeyboardKey", + "label": "Accelerator key", + "name": "Accelerator" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsAirplane3D" + }, + { + "propertyName": "TurnLeft" + }, + { + "propertyName": "TurnRight" + }, + { + "propertyName": "TurnUp" + }, + { + "propertyName": "TurnDown" + }, + { + "propertyName": "Accelerator" + } + ] + } + } + ], + "eventsBasedObjects": [] +} diff --git a/extensions/community/PhysicsAirplane3DGamepadMapper.json b/extensions/community/PhysicsAirplane3DGamepadMapper.json new file mode 100644 index 000000000..a8f8986d0 --- /dev/null +++ b/extensions/community/PhysicsAirplane3DGamepadMapper.json @@ -0,0 +1,395 @@ +{ + "author": "", + "category": "Input", + "dimension": "3D", + "extensionNamespace": "", + "fullName": "3D airplane gamepad mapper", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjEzLDE4IDIxLDE4IDEyLDI4IDgsMjggIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMC4yLDE0IDEzLDYgOSw2IDEzLDE0ICIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyLDIwSDRMMSw5aDNsNCw1SDI4YzAuOCwwLDEuNiwwLjMsMi4xLDAuOWwwLDBjMS4yLDEuMiwxLjIsMy4xLDAsNC4ybDAsMEMyOS41LDE5LjcsMjguOCwyMCwyOCwyMGgtOC44Ii8+DQo8L3N2Zz4NCg==", + "name": "PhysicsAirplane3DGamepadMapper", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Vehicles and Transport/49e91b8e69b677706be23ab4f1ca25d6771c0312e5f77dc1d93f95e7afa396b0_Vehicles and Transport_airplane_air_plane_fly.svg", + "shortDescription": "Control a 3D physics airplane with a gamepad.", + "version": "1.0.0", + "description": "Control a 3D physics airplane with a gamepad.", + "tags": [ + "3d" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [ + { + "description": "Control a 3D physics airplane with a gamepad.", + "fullName": "3D airplane gamepad mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsAirplane3DGamepadMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::StickForce" + }, + "parameters": [ + "", + "!=", + "0", + "GamepadIdentifier", + "DirectionStick", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnHorizontallyStick" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "Gamepads::StickForceX(GamepadIdentifier, DirectionStick)", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnVerticallyStick" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "-Gamepads::StickForceY(GamepadIdentifier, DirectionStick)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnVerticallyStick" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "Gamepads::StickForceY(GamepadIdentifier, DirectionStick)", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "GamepadIdentifier", + "\"RT\"", + "\"Up\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateAcceleratorStick" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "Gamepads::TriggerPressure(GamepadIdentifier, \"RT\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3DGamepadMapper::PhysicsAirplane3DGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the stick should be pulled to move upward.", + "fullName": "Pull to move upward", + "functionType": "Condition", + "name": "ShouldBePulledToMoveUp", + "sentence": "_PARAM0_ should be pulled to move upward", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3DGamepadMapper::PhysicsAirplane3DGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the stick should be pulled to move upward.", + "fullName": "Pull to move upward", + "functionType": "Action", + "name": "SetShouldBePulledToMoveUp", + "sentence": "_PARAM0_ should be pulled to move upward: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3DGamepadMapper::PhysicsAirplane3DGamepadMapper", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "ShouldPullToMoveUp", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "ShouldBePulledToMoveUp" + }, + { + "functionName": "SetShouldBePulledToMoveUp" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics airplane", + "extraInformation": [ + "PhysicsAirplane3D::PhysicsAirplane3D" + ], + "choices": [], + "name": "PhysicsAirplane3D" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "name": "GamepadIdentifier" + }, + { + "value": "Left", + "type": "Choice", + "label": "Direction joystick", + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } + ], + "name": "DirectionStick" + }, + { + "value": "true", + "type": "Boolean", + "label": "Pull to move upward", + "name": "ShouldBePulledToMoveUp" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsAirplane3D" + }, + { + "propertyName": "GamepadIdentifier" + }, + { + "propertyName": "DirectionStick" + }, + { + "propertyName": "ShouldBePulledToMoveUp" + } + ] + } + } + ], + "eventsBasedObjects": [], + "requiredExtensions": [ + { + "extensionName": "Gamepads", + "extensionVersion": "0.9.1" + }, + { + "extensionName": "PhysicsAirplane3D", + "extensionVersion": "1.0.0" + } + ] +} diff --git a/extensions/community/PhysicsAirplane3DMultitouchMapper.json b/extensions/community/PhysicsAirplane3DMultitouchMapper.json new file mode 100644 index 000000000..f96718db4 --- /dev/null +++ b/extensions/community/PhysicsAirplane3DMultitouchMapper.json @@ -0,0 +1,403 @@ +{ + "author": "", + "category": "Input", + "dimension": "3D", + "extensionNamespace": "", + "fullName": "3D airplane multitouch controller mapper", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjEzLDE4IDIxLDE4IDEyLDI4IDgsMjggIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMC4yLDE0IDEzLDYgOSw2IDEzLDE0ICIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyLDIwSDRMMSw5aDNsNCw1SDI4YzAuOCwwLDEuNiwwLjMsMi4xLDAuOWwwLDBjMS4yLDEuMiwxLjIsMy4xLDAsNC4ybDAsMEMyOS41LDE5LjcsMjguOCwyMCwyOCwyMGgtOC44Ii8+DQo8L3N2Zz4NCg==", + "name": "PhysicsAirplane3DMultitouchMapper", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Vehicles and Transport/49e91b8e69b677706be23ab4f1ca25d6771c0312e5f77dc1d93f95e7afa396b0_Vehicles and Transport_airplane_air_plane_fly.svg", + "shortDescription": "Control a 3D physics airplane with a multitouch controller.", + "version": "1.0.0", + "description": "Control a 3D physics airplane with a multitouch controller.", + "tags": [ + "3d" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [ + { + "description": "Control a 3D physics airplane with a multitouch controller.", + "fullName": "3D airplane multitouch controller mapper", + "helpPath": "", + "iconUrl": "", + "name": "PhysicsAirplane3DMutitouchMapper", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "DirectionJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnHorizontallyStick" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, DirectionJoystickIdentifier)", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnVerticallyStick" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, DirectionJoystickIdentifier)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateTurnVerticallyStick" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, DirectionJoystickIdentifier)", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "AcceleratorButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SimulateAcceleratorKey" + }, + "parameters": [ + "Object", + "PhysicsAirplane3D", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3DMultitouchMapper::PhysicsAirplane3DMutitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the joystick should be pulled to move upward.", + "fullName": "Pull to move upward", + "functionType": "Condition", + "name": "ShouldBePulledToMoveUp", + "sentence": "_PARAM0_ should be pulled to move upward", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3DMultitouchMapper::PhysicsAirplane3DMutitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the joystick should be pulled to move upward.", + "fullName": "Pull to move upward", + "functionType": "Action", + "name": "SetShouldBePulledToMoveUp", + "sentence": "_PARAM0_ should be pulled to move upward: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBePulledToMoveUp", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3DMultitouchMapper::PhysicsAirplane3DMutitouchMapper", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "ShouldPullToMoveUp", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "ShouldBePulledToMoveUp" + }, + { + "functionName": "SetShouldBePulledToMoveUp" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics airplane", + "extraInformation": [ + "PhysicsAirplane3D::PhysicsAirplane3D" + ], + "choices": [], + "name": "PhysicsAirplane3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Direction joystick", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "DirectionJoystickIdentifier" + }, + { + "value": "B", + "type": "String", + "label": "Accelerator button name", + "name": "AcceleratorButton" + }, + { + "value": "true", + "type": "Boolean", + "label": "Pull to move upward", + "name": "ShouldBePulledToMoveUp" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsAirplane3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "DirectionJoystickIdentifier" + }, + { + "propertyName": "AcceleratorButton" + }, + { + "propertyName": "ShouldBePulledToMoveUp" + } + ] + } + } + ], + "eventsBasedObjects": [], + "requiredExtensions": [ + { + "extensionName": "PhysicsAirplane3D", + "extensionVersion": "1.0.0" + }, + { + "extensionName": "SpriteMultitouchJoystick", + "extensionVersion": "1.9.1" + } + ] +} diff --git a/extensions/reviewed/SpriteMultitouchJoystick.json b/extensions/reviewed/SpriteMultitouchJoystick.json index d86da5601..1bd358dac 100644 --- a/extensions/reviewed/SpriteMultitouchJoystick.json +++ b/extensions/reviewed/SpriteMultitouchJoystick.json @@ -1,6 +1,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -9,7 +10,7 @@ "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", "shortDescription": "On-screen multitouch joystick and buttons.", - "version": "1.9.0", + "version": "1.9.1", "description": [ "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", "- 4 or 8 directions", @@ -1985,12 +1986,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -2889,6 +2972,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -2969,6 +3053,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -3049,6 +3134,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -3141,6 +3227,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -3190,13 +3346,41 @@ "name": "TouchIndex" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "JoystickAngle" + }, + { + "propertyName": "JoystickForce" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + } + ] + } }, { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -3683,6 +3867,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -3733,13 +3937,41 @@ "name": "Radius" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "ButtonIdentifier" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIndex" + }, + { + "propertyName": "IsReleased" + }, + { + "propertyName": "IsJustPressed" + }, + { + "propertyName": "Radius" + } + ] + } }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -3913,6 +4145,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -3955,13 +4195,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Property" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4056,6 +4320,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4098,13 +4370,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4188,6 +4484,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -4230,13 +4534,37 @@ "name": "JumpButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCharacter3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "JumpButton" + } + ] + } + ] + } }, { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -4477,6 +4805,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -4557,6 +4886,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -4637,6 +4967,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -4717,6 +5048,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -4797,6 +5129,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -4877,6 +5210,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -4957,6 +5291,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -5037,6 +5372,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -5117,6 +5453,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -5153,6 +5490,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5272,13 +5694,82 @@ "name": "CurrentRotationSpeedY" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Object3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "CameraStick" + } + ] + }, + { + "folderName": "Horizontal rotation", + "children": [ + { + "propertyName": "HorizontalRotationSpeedMax" + }, + { + "propertyName": "HorizontalRotationAcceleration" + }, + { + "propertyName": "HorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "Vertical rotation", + "children": [ + { + "propertyName": "VerticalRotationSpeedMax" + }, + { + "propertyName": "VerticalRotationAcceleration" + }, + { + "propertyName": "VerticalRotationDeceleration" + }, + { + "propertyName": "VerticalAngleMin" + }, + { + "propertyName": "VerticalAngleMax" + } + ] + }, + { + "folderName": "Position", + "children": [ + { + "propertyName": "OffsetZ" + } + ] + }, + { + "propertyName": "CurrentRotationSpeedZ" + }, + { + "propertyName": "CurrentRotationSpeedY" + } + ] + } }, { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5312,7 +5803,7 @@ "parameters": [ "Object", "PhysicsCar3D", - "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, \"Primary\")" + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, SteerJoystickIdentifier)" ] } ] @@ -5342,7 +5833,7 @@ "parameters": [ "Object", "PhysicsCar3D", - "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, \"Secondary\")" + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, SpeedJoystickIdentifier)" ] } ] @@ -5391,6 +5882,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -5450,13 +5949,40 @@ "name": "HandBrakeButton" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "PhysicsCar3D" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "SteerJoystickIdentifier" + }, + { + "propertyName": "SpeedJoystickIdentifier" + }, + { + "propertyName": "HandBrakeButton" + } + ] + } + ] + } }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -5963,6 +6489,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -6018,7 +6552,28 @@ "name": "StickMode" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "TopDownMovement" + }, + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "folderName": "Controls", + "children": [ + { + "propertyName": "StickMode" + } + ] + } + ] + } } ], "eventsBasedObjects": [ @@ -6033,8 +6588,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -6113,6 +6671,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -6139,6 +6698,7 @@ } ], "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -7093,6 +7653,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -7165,6 +7726,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -7237,6 +7799,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -7270,6 +7833,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -7347,7 +7989,36 @@ "hidden": true, "name": "ShouldBeHiddenWhenReleased" } - ] + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ControllerIdentifier" + }, + { + "propertyName": "JoystickIdentifier" + }, + { + "propertyName": "DeadZoneRadius" + }, + { + "propertyName": "ThumbAnchorOrigin" + }, + { + "propertyName": "ThumbAnchorTarget" + }, + { + "propertyName": "ThumbIsScaledProportionally" + }, + { + "propertyName": "ParentOrigin" + }, + { + "propertyName": "ShouldBeHiddenWhenReleased" + } + ] + } } ] -} \ No newline at end of file +} From ec452e9f8b72fde2dabc120dc791a530f768108a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 21 Jun 2026 19:23:01 +0200 Subject: [PATCH 2/4] Smoother spinning --- extensions/community/PhysicsAirplane3D.json | 436 ++++++++++---------- 1 file changed, 219 insertions(+), 217 deletions(-) diff --git a/extensions/community/PhysicsAirplane3D.json b/extensions/community/PhysicsAirplane3D.json index e1fd57fb7..57b7f6845 100644 --- a/extensions/community/PhysicsAirplane3D.json +++ b/extensions/community/PhysicsAirplane3D.json @@ -158,7 +158,6 @@ "/** @type {number} */", "const angle = eventsFunctionContext.getArgument(\"Angle\");", "", - "console.log(angle);", "if (angle === 0) {", " return;", "}", @@ -248,6 +247,30 @@ "=", "ForwardSpeedMin" ] + }, + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SetSpinHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "SpinHalfwayDuration", + "" + ] + }, + { + "type": { + "value": "PhysicsAirplane3D::PhysicsAirplane3D::SetForceFeedbackSpinHalfwayDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "ForceFeedbackSpinHalfwayDuration", + "" + ] } ] } @@ -523,75 +546,7 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "ForceFeedbackSpinSpeed", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "ForceFeedbackSpinSpeed", - "=", - "abs(Object.Object3D::RotationX() / ForceFeedbackSpinDuration)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Scene3D::Base3DBehavior::RotationX" - }, - "parameters": [ - "Object", - "Object3D", - "<", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Scene3D::Base3DBehavior::SetRotationX" - }, - "parameters": [ - "Object", - "Object3D", - "=", - "min(0, Object.Object3D::RotationX() + ForceFeedbackSpinSpeed * TimeDelta)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Scene3D::Base3DBehavior::RotationX" - }, - "parameters": [ - "Object", - "Object3D", - ">", - "0" - ] - } - ], + "conditions": [], "actions": [ { "type": { @@ -601,53 +556,9 @@ "Object", "Object3D", "=", - "max(0, Object.Object3D::RotationX() - ForceFeedbackSpinSpeed * TimeDelta)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "CurrentSpin", - "<", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentSpin", - "=", - "min(0, CurrentSpin + ForceFeedbackSpinSpeed * TimeDelta)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "CurrentSpin", - ">", - "0" + "Object.Object3D::RotationX() * exp(TimeDelta() * ForceFeedbackSpinLogSpeed)" ] - } - ], - "actions": [ + }, { "type": { "value": "SetNumberVariable" @@ -655,7 +566,7 @@ "parameters": [ "CurrentSpin", "=", - "max(0, CurrentSpin - ForceFeedbackSpinSpeed * TimeDelta)" + "CurrentSpin * exp(TimeDelta() * ForceFeedbackSpinLogSpeed)" ] } ] @@ -706,18 +617,7 @@ ] } ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "ForceFeedbackSpinSpeed", - "=", - "0" - ] - } - ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -737,45 +637,7 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "CurrentSpin", - "<", - "TargetedSpin" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Delta", - "=", - "min(CurrentSpin + SpinSpeed * TimeDelta, TargetedSpin) - CurrentSpin" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "CurrentSpin", - ">", - "TargetedSpin" - ] - } - ], + "conditions": [], "actions": [ { "type": { @@ -784,7 +646,7 @@ "parameters": [ "Delta", "=", - "max(CurrentSpin - SpinSpeed * TimeDelta, TargetedSpin) - CurrentSpin" + "TargetedSpin + AngleDifference(CurrentSpin, TargetedSpin) * exp(TimeDelta() * SpinLogSpeed) - CurrentSpin" ] } ] @@ -1208,16 +1070,6 @@ "=", "Value" ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "Value", - "\"info\"", - "" - ] } ] } @@ -2094,12 +1946,12 @@ "objectGroups": [] }, { - "description": "the spin speed of the object.", - "fullName": "Spin speed", + "description": "the halfway time for spinning of the object.", + "fullName": "Halfway time for spinning", "functionType": "ExpressionAndCondition", "group": "3D physics airplane configuration", - "name": "SpinSpeed", - "sentence": "the spin speed", + "name": "SpinHalfwayDuration", + "sentence": "the halfway time for spinning", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -2110,7 +1962,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "SpinSpeed" + "SpinHalfwayDuration" ] } ] @@ -2137,11 +1989,23 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "SpinSpeed", + "getterName": "SpinHalfwayDuration", "group": "3D physics airplane configuration", - "name": "SetSpinSpeed", + "name": "SetSpinHalfwayDuration", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -2151,10 +2015,123 @@ "value": "SetNumberVariable" }, "parameters": [ - "SpinSpeed", + "SpinHalfwayDuration", "=", "Value" ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SpinLogSpeed", + "=", + "log(0.5) / Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the halfway time for force feedback spinning of the object. Spin back to level with the horizon when direction inputs are released. Can be set to 0 to disable it.", + "fullName": "Halfway time for force feedback spinning", + "functionType": "ExpressionAndCondition", + "group": "3D physics airplane configuration", + "name": "ForceFeedbackSpinHalfwayDuration", + "sentence": "the halfway time for force feedback spinning", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ForceFeedbackSpinHalfwayDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PhysicsAirplane3D::PhysicsAirplane3D", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ForceFeedbackSpinHalfwayDuration", + "group": "3D physics airplane configuration", + "name": "SetForceFeedbackSpinHalfwayDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForceFeedbackSpinHalfwayDuration", + "=", + "Value" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ForceFeedbackSpinLogSpeed", + "=", + "log(0.5) / Value" + ] } ] } @@ -2280,10 +2257,16 @@ "functionName": "SetSpinMax" }, { - "functionName": "SpinSpeed" + "functionName": "SpinHalfwayDuration" + }, + { + "functionName": "SetSpinHalfwayDuration" }, { - "functionName": "SetSpinSpeed" + "functionName": "ForceFeedbackSpinHalfwayDuration" + }, + { + "functionName": "SetForceFeedbackSpinHalfwayDuration" } ] } @@ -2379,25 +2362,26 @@ { "value": "0", "type": "Number", - "unit": "PixelSpeed", - "label": "Force feedback spin speed", + "label": "", + "group": "Spin", "hidden": true, - "name": "ForceFeedbackSpinSpeed" + "name": "ForceFeedbackSpinLogSpeed" }, { - "value": "0.5", + "value": "0.25", "type": "Number", - "unit": "PixelSpeed", - "label": "Force feedback spin duration", - "description": "Spin back to level with the horizon when direction inputs are released. Can be set to 0 to disable it.", - "hidden": true, - "name": "ForceFeedbackSpinDuration" + "unit": "Second", + "label": "Halfway time for force feedback spinning", + "description": "Spin back to level with the horizon when direction inputs are released.", + "group": "Spin", + "name": "ForceFeedbackSpinHalfwayDuration" }, { "value": "0", "type": "Number", "unit": "DegreeAngle", "label": "Current spin", + "group": "Spin", "hidden": true, "name": "CurrentSpin" }, @@ -2406,14 +2390,16 @@ "type": "Number", "unit": "DegreeAngle", "label": "Max spin", + "group": "Spin", "name": "SpinMax" }, { - "value": "120", + "value": "0.5", "type": "Number", - "unit": "AngularSpeed", - "label": "Spin speed", - "name": "SpinSpeed" + "unit": "Second", + "label": "Halfway time for spinning", + "group": "Spin", + "name": "SpinHalfwayDuration" }, { "value": "0", @@ -2438,6 +2424,14 @@ "label": "", "hidden": true, "name": "TurnVerticallyInput" + }, + { + "value": "0", + "type": "Number", + "label": "", + "group": "Spin", + "hidden": true, + "name": "SpinLogSpeed" } ], "propertiesFolderStructure": { @@ -2476,21 +2470,6 @@ { "propertyName": "ForwardDeceleration" }, - { - "propertyName": "ForceFeedbackSpinSpeed" - }, - { - "propertyName": "ForceFeedbackSpinDuration" - }, - { - "propertyName": "CurrentSpin" - }, - { - "propertyName": "SpinMax" - }, - { - "propertyName": "SpinSpeed" - }, { "propertyName": "AcceleratorInput" }, @@ -2499,6 +2478,29 @@ }, { "propertyName": "TurnVerticallyInput" + }, + { + "folderName": "Spin", + "children": [ + { + "propertyName": "SpinMax" + }, + { + "propertyName": "CurrentSpin" + }, + { + "propertyName": "SpinHalfwayDuration" + }, + { + "propertyName": "SpinLogSpeed" + }, + { + "propertyName": "ForceFeedbackSpinHalfwayDuration" + }, + { + "propertyName": "ForceFeedbackSpinLogSpeed" + } + ] } ] } From edfddce1c5354d1d4be4f5fe9d237635db300a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 21 Jun 2026 19:24:58 +0200 Subject: [PATCH 3/4] Define JS usage --- scripts/lib/ExtensionsValidatorExceptions.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/lib/ExtensionsValidatorExceptions.js b/scripts/lib/ExtensionsValidatorExceptions.js index dff4797d9..2f53bc30d 100644 --- a/scripts/lib/ExtensionsValidatorExceptions.js +++ b/scripts/lib/ExtensionsValidatorExceptions.js @@ -250,12 +250,18 @@ const extensionsAllowedProperties = { runtimeSceneAllowedProperties: [], javaScriptObjectAllowedProperties: [], }, - FireBullet: { - gdjsAllowedProperties: ['__fireBulletExtension', 'RuntimeObject3D'], - gdjsEvtToolsAllowedProperties: [], - runtimeSceneAllowedProperties: [], - javaScriptObjectAllowedProperties: [], - }, + FireBullet: { + gdjsAllowedProperties: ['__fireBulletExtension', 'RuntimeObject3D'], + gdjsEvtToolsAllowedProperties: [], + runtimeSceneAllowedProperties: [], + javaScriptObjectAllowedProperties: [], + }, + PhysicsAirplane3D: { + gdjsAllowedProperties: ['RuntimeObject3D'], + gdjsEvtToolsAllowedProperties: [], + runtimeSceneAllowedProperties: [], + javaScriptObjectAllowedProperties: [], + }, FoliageSwaying3D: { gdjsAllowedProperties: [ '_foliageSwaying3D', From be5eb22d54fc0c39cfb617c82531126aefef2e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 21 Jun 2026 19:35:44 +0200 Subject: [PATCH 4/4] Format --- scripts/lib/ExtensionsValidatorExceptions.js | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/lib/ExtensionsValidatorExceptions.js b/scripts/lib/ExtensionsValidatorExceptions.js index 2f53bc30d..51a36f585 100644 --- a/scripts/lib/ExtensionsValidatorExceptions.js +++ b/scripts/lib/ExtensionsValidatorExceptions.js @@ -250,18 +250,18 @@ const extensionsAllowedProperties = { runtimeSceneAllowedProperties: [], javaScriptObjectAllowedProperties: [], }, - FireBullet: { - gdjsAllowedProperties: ['__fireBulletExtension', 'RuntimeObject3D'], - gdjsEvtToolsAllowedProperties: [], - runtimeSceneAllowedProperties: [], - javaScriptObjectAllowedProperties: [], - }, - PhysicsAirplane3D: { - gdjsAllowedProperties: ['RuntimeObject3D'], - gdjsEvtToolsAllowedProperties: [], - runtimeSceneAllowedProperties: [], - javaScriptObjectAllowedProperties: [], - }, + FireBullet: { + gdjsAllowedProperties: ['__fireBulletExtension', 'RuntimeObject3D'], + gdjsEvtToolsAllowedProperties: [], + runtimeSceneAllowedProperties: [], + javaScriptObjectAllowedProperties: [], + }, + PhysicsAirplane3D: { + gdjsAllowedProperties: ['RuntimeObject3D'], + gdjsEvtToolsAllowedProperties: [], + runtimeSceneAllowedProperties: [], + javaScriptObjectAllowedProperties: [], + }, FoliageSwaying3D: { gdjsAllowedProperties: [ '_foliageSwaying3D',