diff --git a/extensions/community/FirstPersonMovement.json b/extensions/community/FirstPersonMovement.json new file mode 100644 index 00000000..6b06b98d --- /dev/null +++ b/extensions/community/FirstPersonMovement.json @@ -0,0 +1,491 @@ +{ + "author": "", + "category": "Movement", + "extensionNamespace": "", + "fullName": "3D player Movement", + "helpPath": "https://LazyPandaStudios.itch.io", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggZD0iTTI5LDExaC04VjNjMC0wLjYtMC40LTEtMS0xaC04Yy0wLjYsMC0xLDAuNC0xLDF2OEgzYy0wLjYsMC0xLDAuNC0xLDF2OGMwLDAuNiwwLjQsMSwxLDFoOHY4YzAsMC42LDAuNCwxLDEsMWg4DQoJYzAuNiwwLDEtMC40LDEtMXYtOGg4YzAuNiwwLDEtMC40LDEtMXYtOEMzMCwxMS40LDI5LjYsMTEsMjksMTF6IE04LDE2LjdjMCwwLjQtMC4yLDAuNy0wLjUsMC45Yy0wLjEsMC4xLTAuMywwLjEtMC41LDAuMQ0KCWMtMC4yLDAtMC40LTAuMS0wLjYtMC4ybC0xLTAuN0M1LjIsMTYuNiw1LDE2LjMsNSwxNnMwLjItMC42LDAuNC0wLjhsMS0wLjdjMC4zLTAuMiwwLjctMC4yLDEsMEM3LjgsMTQuNiw4LDE1LDgsMTUuM1YxNi43eg0KCSBNMTcuNSwyNS42bC0wLjcsMUMxNi42LDI2LjgsMTYuMywyNywxNiwyN3MtMC42LTAuMi0wLjgtMC40bC0wLjctMWMtMC4yLTAuMy0wLjItMC43LDAtMVMxNSwyNCwxNS4zLDI0aDEuM2MwLjQsMCwwLjcsMC4yLDAuOSwwLjUNCglTMTcuNywyNS4yLDE3LjUsMjUuNnogTTE3LjUsNy41QzE3LjQsNy44LDE3LDgsMTYuNyw4aC0xLjNjLTAuNCwwLTAuNy0wLjItMC45LTAuNXMtMC4yLTAuNywwLTFsMC43LTFjMC40LTAuNiwxLjMtMC42LDEuNywwbDAuNywxDQoJQzE3LjcsNi44LDE3LjcsNy4xLDE3LjUsNy41eiBNMjYuNiwxNi44bC0xLDAuN2MtMC4yLDAuMS0wLjQsMC4yLTAuNiwwLjJjLTAuMiwwLTAuMywwLTAuNS0wLjFDMjQuMiwxNy40LDI0LDE3LDI0LDE2Ljd2LTEuMw0KCWMwLTAuNCwwLjItMC43LDAuNS0wLjljMC4zLTAuMiwwLjctMC4yLDEsMGwxLDAuN2MwLjMsMC4yLDAuNCwwLjUsMC40LDAuOFMyNi44LDE2LjYsMjYuNiwxNi44eiIvPg0KPC9zdmc+DQo=", + "name": "FirstPersonMovement", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Videogames/c240b1c74f1304a51fce326df0582ab741b3475613032c370472ffd61d09e096_Videogames_direction_controller_joystic_navigation_platformer.svg", + "shortDescription": "First-Person Player Movement.", + "version": "1.0.0", + "description": "setup keys and speed of the player object in your 3D games !", + "tags": [ + "3D", + "Movement" + ], + "authorIds": [ + "oc974hW1zSYZfAnRbpKoXizqc1D3" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "choose keys and speed for a 3D firstperson objects movement. (Angle Based Movement).", + "fullName": "PlayerMovement3D", + "name": "FirstPersonMovement", + "objectType": "Scene3D::Cube3DObject", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Forward_Key" + ] + } + ], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Object", + "Object.Angle()+0", + "obj_speed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Left_key" + ] + } + ], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Object", + "Object.Angle()-90", + "obj_speed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Backward_key" + ] + } + ], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Object", + "Object.Angle()-180", + "obj_speed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Right_key" + ] + } + ], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Object", + "Object.Angle()-270", + "obj_speed", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Cube3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FirstPersonMovement::FirstPersonMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "speed of the object the behavior is attached to.", + "fullName": "obj_speed", + "functionType": "Expression", + "name": "Speed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "obj_speed" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Cube3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FirstPersonMovement::FirstPersonMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change Forward key binding.", + "fullName": "Change Forward key binding", + "functionType": "Action", + "name": "ChangeForwardkey", + "sentence": "Change Forward Key bind of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FirstPersonMovement::FirstPersonMovement::SetPropertyForward_Key" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Key\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Cube3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FirstPersonMovement::FirstPersonMovement", + "type": "behavior" + }, + { + "description": "Forward key", + "name": "Key", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Change backward key binding.", + "fullName": "Change backward key binding", + "functionType": "Action", + "name": "Changebackwardkey", + "sentence": "Change backward Key bind of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FirstPersonMovement::FirstPersonMovement::SetPropertyBackward_key" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Key\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Cube3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FirstPersonMovement::FirstPersonMovement", + "type": "behavior" + }, + { + "description": "Backward key", + "name": "Key", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Change right key binding.", + "fullName": "Change right key binding", + "functionType": "Action", + "name": "ChangeRightkey", + "sentence": "Change right Key bind of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FirstPersonMovement::FirstPersonMovement::SetPropertyRight_key" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Key\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Cube3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FirstPersonMovement::FirstPersonMovement", + "type": "behavior" + }, + { + "description": "right key", + "name": "Key", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Change left key binding.", + "fullName": "Change left key binding", + "functionType": "Action", + "name": "ChangeLeftkey", + "sentence": "Change left Key bind of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FirstPersonMovement::FirstPersonMovement::SetPropertyLeft_key" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Key\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Cube3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FirstPersonMovement::FirstPersonMovement", + "type": "behavior" + }, + { + "description": "Left key", + "name": "Key", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Chnage player's movement speed.", + "fullName": "Change movement speed", + "functionType": "Action", + "name": "ChangeSpeed", + "sentence": "Change _PARAM0_'s speed to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FirstPersonMovement::FirstPersonMovement::SetPropertyobj_speed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"speed\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Cube3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FirstPersonMovement::FirstPersonMovement", + "type": "behavior" + }, + { + "description": "Speed", + "name": "speed", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "w", + "type": "String", + "label": "Move Forward", + "description": "lower case letters only.", + "group": "", + "extraInformation": [ + "" + ], + "hidden": false, + "name": "Forward_Key" + }, + { + "value": "a", + "type": "String", + "label": "Strafe (move) Left", + "description": "lower case letters only.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Left_key" + }, + { + "value": "s", + "type": "String", + "label": "Move Backward", + "description": "lower case letters only.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Backward_key" + }, + { + "value": "d", + "type": "String", + "label": "Strafe (move) Right", + "description": "lower case letters only.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Right_key" + }, + { + "value": "200", + "type": "Number", + "unit": "PixelSpeed", + "label": "Obj speed", + "description": "Speed of camera object.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "obj_speed" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] +} \ No newline at end of file