Skip to content

Commit 4cbdc37

Browse files
EldarduilD8H
authored andcommitted
[First person camera] Allow to use any 3D object
- Thanks @Eldarduil
1 parent f9d9f84 commit 4cbdc37

File tree

1 file changed

+96
-9
lines changed

1 file changed

+96
-9
lines changed

extensions/reviewed/FirstPersonCamera.json

Lines changed: 96 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"author": "",
33
"category": "Camera",
44
"extensionNamespace": "",
5-
"gdevelopVersion": ">=5.5.222",
65
"fullName": "First person 3D camera",
6+
"gdevelopVersion": ">=5.5.222",
77
"helpPath": "",
88
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjcsMTZjMCwwLTQuOSw3LTExLDdTNSwxNiw1LDE2czQuOS03LDExLTdTMjcsMTYsMjcsMTZ6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxNiIgY3k9IjE2IiByPSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIzLDkgMywzIDksMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjksMjkgMywyOSAzLDIzICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjksMjMgMjksMjkgMjMsMjkgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMywzIDI5LDMgMjksOSAiLz4NCjwvc3ZnPg0K",
99
"name": "FirstPersonCamera",
1010
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Security and Protection/e8248ffd504c314e6a9d9d560c3a0fdad3398a5f125ae6a4c0654d4e68c86376_Security and Protection_security_protection_eye_scan_lock.svg",
1111
"shortDescription": "Move the camera to look though objects eyes.",
12-
"version": "1.0.3",
12+
"version": "1.0.4",
1313
"description": [
1414
"Move the camera to look though objects eyes.",
1515
"",
@@ -27,16 +27,20 @@
2727
"fps"
2828
],
2929
"authorIds": [
30-
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2"
30+
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2",
31+
"m8kleQHonagHWsvILDhyJhgVhuF2"
3132
],
3233
"dependencies": [],
34+
"globalVariables": [],
35+
"sceneVariables": [],
3336
"eventsFunctions": [
3437
{
35-
"description": "Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.",
38+
"description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.",
3639
"fullName": "Look through object eyes",
3740
"functionType": "Action",
3841
"group": "Layers and cameras",
3942
"name": "LookFromObjectEyes",
43+
"private": true,
4044
"sentence": "Move the camera of _PARAM2_ to look though _PARAM1_ eyes",
4145
"events": [
4246
{
@@ -67,14 +71,92 @@
6771
""
6872
]
6973
},
74+
{
75+
"type": {
76+
"value": "Scene3D::SetCameraRotationX"
77+
},
78+
"parameters": [
79+
"",
80+
"=",
81+
"- Object.RotationY() + 90",
82+
"Layer",
83+
""
84+
]
85+
},
86+
{
87+
"type": {
88+
"value": "Scene3D::SetCameraRotationY"
89+
},
90+
"parameters": [
91+
"",
92+
"=",
93+
"Object.RotationX()",
94+
"Layer",
95+
""
96+
]
97+
},
98+
{
99+
"type": {
100+
"value": "SetCameraAngle"
101+
},
102+
"parameters": [
103+
"",
104+
"=",
105+
"Object.Angle() + 90",
106+
"Layer",
107+
""
108+
]
109+
}
110+
]
111+
}
112+
],
113+
"parameters": [
114+
{
115+
"description": "Object",
116+
"name": "Object",
117+
"supplementaryInformation": "Scene3D::Cube3DObject",
118+
"type": "objectList"
119+
},
120+
{
121+
"description": "Layer",
122+
"name": "Layer",
123+
"type": "layer"
124+
}
125+
],
126+
"objectGroups": []
127+
},
128+
{
129+
"description": "Move the camera to look though the object eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.",
130+
"fullName": "Look through object eyes",
131+
"functionType": "Action",
132+
"group": "Layers and cameras",
133+
"name": "LookFrom3DObjectEyes",
134+
"sentence": "Move the camera of _PARAM3_ to look though _PARAM1_ eyes",
135+
"events": [
136+
{
137+
"type": "BuiltinCommonInstructions::Standard",
138+
"conditions": [],
139+
"actions": [
140+
{
141+
"type": {
142+
"value": "CentreCamera"
143+
},
144+
"parameters": [
145+
"",
146+
"Object",
147+
"",
148+
"Layer",
149+
""
150+
]
151+
},
70152
{
71153
"type": {
72154
"value": "Scene3D::SetCameraZ"
73155
},
74156
"parameters": [
75157
"",
76158
"=",
77-
"Object.Z()",
159+
"Object.Object3D::Z()",
78160
"Layer",
79161
""
80162
]
@@ -86,7 +168,7 @@
86168
"parameters": [
87169
"",
88170
"=",
89-
"- Object.RotationY() + 90",
171+
"- Object.Object3D::RotationY() + 90",
90172
"Layer",
91173
""
92174
]
@@ -98,7 +180,7 @@
98180
"parameters": [
99181
"",
100182
"=",
101-
"Object.RotationX()",
183+
"Object.Object3D::RotationX()",
102184
"Layer",
103185
""
104186
]
@@ -120,11 +202,16 @@
120202
],
121203
"parameters": [
122204
{
123-
"description": "Object",
205+
"description": "3D Object",
124206
"name": "Object",
125-
"supplementaryInformation": "Scene3D::Cube3DObject",
126207
"type": "objectList"
127208
},
209+
{
210+
"description": "3D capability",
211+
"name": "Object3D",
212+
"supplementaryInformation": "Scene3D::Base3DBehavior",
213+
"type": "behavior"
214+
},
128215
{
129216
"description": "Layer",
130217
"name": "Layer",

0 commit comments

Comments
 (0)