|
2 | 2 | "author": "", |
3 | 3 | "category": "Camera", |
4 | 4 | "extensionNamespace": "", |
5 | | - "gdevelopVersion": ">=5.5.222", |
6 | 5 | "fullName": "Third person camera", |
| 6 | + "gdevelopVersion": ">=5.5.222", |
7 | 7 | "helpPath": "", |
8 | 8 | "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSI3LDEwIDEsMTMgNywxNiAxMywxMyAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjEsMTMgMSwyMCA3LDIzIDEzLDIwIDEzLDEzICIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjciIHkxPSIxNiIgeDI9IjciIHkyPSIyMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMxIiB5MT0iMTYiIHgyPSIyMSIgeTI9IjgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMzEiIHkyPSIxNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjcsMjIuNkMyMCwyMS43LDE4LDE5LjEsMTgsMTZjMC0zLjEsMi01LjcsNC43LTYuNiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE5LjgsMTEuM2MxLjQsMS4xLDIuMiwyLjgsMi4yLDQuN2MwLDEuOS0wLjksMy42LTIuMiw0LjciLz4NCjwvc3ZnPg0K", |
9 | 9 | "name": "ThirdPersonCamera", |
10 | 10 | "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Virtual Reality/94e95d2c318e1f3dc7151a351024e13c574e1e44669c6696aa107d60230073f6_Virtual Reality_3d_vision_eye_vr.svg", |
11 | 11 | "shortDescription": "Move the camera to look at an object from a given distance.", |
12 | | - "version": "1.6.1", |
| 12 | + "version": "1.7.0", |
13 | 13 | "description": [ |
14 | 14 | "Move the camera to look at an object from a given distance with a rotation and an elevation angles.", |
15 | 15 | "", |
|
583 | 583 | "" |
584 | 584 | ] |
585 | 585 | }, |
| 586 | + { |
| 587 | + "type": { |
| 588 | + "value": "ThirdPersonCamera::ThirdPersonCamera::SetElevationHalfwayDuration" |
| 589 | + }, |
| 590 | + "parameters": [ |
| 591 | + "Object", |
| 592 | + "Behavior", |
| 593 | + "=", |
| 594 | + "ElevationHalfwayDuration", |
| 595 | + "" |
| 596 | + ] |
| 597 | + }, |
586 | 598 | { |
587 | 599 | "type": { |
588 | 600 | "value": "ThirdPersonCamera::ThirdPersonCamera::SetTranslationZHalfwayDuration" |
|
912 | 924 | } |
913 | 925 | ] |
914 | 926 | }, |
| 927 | + { |
| 928 | + "type": "BuiltinCommonInstructions::Standard", |
| 929 | + "conditions": [ |
| 930 | + { |
| 931 | + "type": { |
| 932 | + "value": "BooleanVariable" |
| 933 | + }, |
| 934 | + "parameters": [ |
| 935 | + "IsElevatingWithObject", |
| 936 | + "True", |
| 937 | + "" |
| 938 | + ] |
| 939 | + } |
| 940 | + ], |
| 941 | + "actions": [ |
| 942 | + { |
| 943 | + "type": { |
| 944 | + "value": "SetNumberVariable" |
| 945 | + }, |
| 946 | + "parameters": [ |
| 947 | + "TargetedElevationAngle", |
| 948 | + "=", |
| 949 | + "Object.Object3D::RotationY()" |
| 950 | + ] |
| 951 | + } |
| 952 | + ] |
| 953 | + }, |
915 | 954 | { |
916 | 955 | "type": "BuiltinCommonInstructions::Standard", |
917 | 956 | "conditions": [], |
|
921 | 960 | "value": "SetNumberVariable" |
922 | 961 | }, |
923 | 962 | "parameters": [ |
924 | | - "CameraAngle", |
| 963 | + "CameraRotationAngle", |
925 | 964 | "=", |
926 | 965 | "TargetedRotationAngle + 90 + RotationAngleOffset + AngleDifference(CameraAngle(Object.Layer()), TargetedRotationAngle + 90 + RotationAngleOffset) * exp(TimeDelta() * RotationLogSpeed)" |
927 | 966 | ] |
928 | 967 | }, |
| 968 | + { |
| 969 | + "type": { |
| 970 | + "value": "SetNumberVariable" |
| 971 | + }, |
| 972 | + "parameters": [ |
| 973 | + "CameraElevationAngle", |
| 974 | + "=", |
| 975 | + "TargetedElevationAngle + ElevationAngleOffset + AngleDifference(90 - Scene3D::CameraRotationX(Object.Layer()), TargetedElevationAngle + ElevationAngleOffset) * exp(TimeDelta() * ElevationLogSpeed)" |
| 976 | + ] |
| 977 | + }, |
929 | 978 | { |
930 | 979 | "type": { |
931 | 980 | "value": "ThirdPersonCamera::LookFromDistanceAtPosition3D" |
932 | 981 | }, |
933 | 982 | "parameters": [ |
934 | 983 | "", |
935 | | - "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraAngle, OffsetX, -OffsetY)", |
936 | | - "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraAngle, OffsetX, -OffsetY)", |
| 984 | + "Object.CenterX() + ThirdPersonCamera::RotatedX(CameraRotationAngle, OffsetX, -OffsetY)", |
| 985 | + "Object.CenterY() + ThirdPersonCamera::RotatedY(CameraRotationAngle, OffsetX, -OffsetY)", |
937 | 986 | "CameraZ + OffsetZ", |
938 | 987 | "Distance", |
939 | | - "CameraAngle", |
940 | | - "Object.Object3D::RotationY() + ElevationAngleOffset", |
| 988 | + "CameraRotationAngle", |
| 989 | + "CameraElevationAngle", |
941 | 990 | "", |
942 | 991 | "" |
943 | 992 | ] |
|
946 | 995 | "variables": [ |
947 | 996 | { |
948 | 997 | "folded": true, |
949 | | - "name": "CameraAngle", |
| 998 | + "name": "CameraRotationAngle", |
| 999 | + "type": "number", |
| 1000 | + "value": 0 |
| 1001 | + }, |
| 1002 | + { |
| 1003 | + "name": "CameraElevationAngle", |
950 | 1004 | "type": "number", |
951 | 1005 | "value": 0 |
952 | 1006 | } |
|
1251 | 1305 | ], |
1252 | 1306 | "objectGroups": [] |
1253 | 1307 | }, |
| 1308 | + { |
| 1309 | + "description": "the halfway time for elevation rotation of the object.", |
| 1310 | + "fullName": "Halfway time for elevation rotation", |
| 1311 | + "functionType": "ExpressionAndCondition", |
| 1312 | + "group": "Third person camera configuration", |
| 1313 | + "name": "ElevationHalfwayDuration", |
| 1314 | + "sentence": "the halfway time for elevation rotation", |
| 1315 | + "events": [ |
| 1316 | + { |
| 1317 | + "type": "BuiltinCommonInstructions::Standard", |
| 1318 | + "conditions": [], |
| 1319 | + "actions": [ |
| 1320 | + { |
| 1321 | + "type": { |
| 1322 | + "value": "SetReturnNumber" |
| 1323 | + }, |
| 1324 | + "parameters": [ |
| 1325 | + "ElevationHalfwayDuration" |
| 1326 | + ] |
| 1327 | + } |
| 1328 | + ] |
| 1329 | + } |
| 1330 | + ], |
| 1331 | + "expressionType": { |
| 1332 | + "type": "expression" |
| 1333 | + }, |
| 1334 | + "parameters": [ |
| 1335 | + { |
| 1336 | + "description": "Object", |
| 1337 | + "name": "Object", |
| 1338 | + "type": "object" |
| 1339 | + }, |
| 1340 | + { |
| 1341 | + "description": "Behavior", |
| 1342 | + "name": "Behavior", |
| 1343 | + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", |
| 1344 | + "type": "behavior" |
| 1345 | + } |
| 1346 | + ], |
| 1347 | + "objectGroups": [] |
| 1348 | + }, |
| 1349 | + { |
| 1350 | + "fullName": "", |
| 1351 | + "functionType": "ActionWithOperator", |
| 1352 | + "getterName": "ElevationHalfwayDuration", |
| 1353 | + "name": "SetElevationHalfwayDuration", |
| 1354 | + "sentence": "", |
| 1355 | + "events": [ |
| 1356 | + { |
| 1357 | + "type": "BuiltinCommonInstructions::Comment", |
| 1358 | + "color": { |
| 1359 | + "b": 109, |
| 1360 | + "g": 230, |
| 1361 | + "r": 255, |
| 1362 | + "textB": 0, |
| 1363 | + "textG": 0, |
| 1364 | + "textR": 0 |
| 1365 | + }, |
| 1366 | + "comment": "ln((1 - speed)) = ln(1 / 2) / halfwatTime" |
| 1367 | + }, |
| 1368 | + { |
| 1369 | + "type": "BuiltinCommonInstructions::Standard", |
| 1370 | + "conditions": [], |
| 1371 | + "actions": [ |
| 1372 | + { |
| 1373 | + "type": { |
| 1374 | + "value": "SetNumberVariable" |
| 1375 | + }, |
| 1376 | + "parameters": [ |
| 1377 | + "ElevationHalfwayDuration", |
| 1378 | + "=", |
| 1379 | + "Value" |
| 1380 | + ] |
| 1381 | + }, |
| 1382 | + { |
| 1383 | + "type": { |
| 1384 | + "value": "SetNumberVariable" |
| 1385 | + }, |
| 1386 | + "parameters": [ |
| 1387 | + "ElevationLogSpeed", |
| 1388 | + "=", |
| 1389 | + "log(0.5) / Value" |
| 1390 | + ] |
| 1391 | + } |
| 1392 | + ] |
| 1393 | + } |
| 1394 | + ], |
| 1395 | + "parameters": [ |
| 1396 | + { |
| 1397 | + "description": "Object", |
| 1398 | + "name": "Object", |
| 1399 | + "type": "object" |
| 1400 | + }, |
| 1401 | + { |
| 1402 | + "description": "Behavior", |
| 1403 | + "name": "Behavior", |
| 1404 | + "supplementaryInformation": "ThirdPersonCamera::ThirdPersonCamera", |
| 1405 | + "type": "behavior" |
| 1406 | + } |
| 1407 | + ], |
| 1408 | + "objectGroups": [] |
| 1409 | + }, |
1254 | 1410 | { |
1255 | 1411 | "description": "the halfway time on Z axis of the object.", |
1256 | 1412 | "fullName": "Halfway time on Z axis", |
|
2190 | 2346 | "extraInformation": [], |
2191 | 2347 | "name": "RotationHalfwayDuration" |
2192 | 2348 | }, |
| 2349 | + { |
| 2350 | + "value": "0", |
| 2351 | + "type": "Number", |
| 2352 | + "unit": "Second", |
| 2353 | + "label": "Halfway time for elevation rotation", |
| 2354 | + "description": "", |
| 2355 | + "group": "Catch-up speed", |
| 2356 | + "extraInformation": [], |
| 2357 | + "name": "ElevationHalfwayDuration" |
| 2358 | + }, |
2193 | 2359 | { |
2194 | 2360 | "value": "0.125", |
2195 | 2361 | "type": "Number", |
|
2292 | 2458 | "hidden": true, |
2293 | 2459 | "name": "RotationLogSpeed" |
2294 | 2460 | }, |
| 2461 | + { |
| 2462 | + "value": "", |
| 2463 | + "type": "Number", |
| 2464 | + "label": "", |
| 2465 | + "description": "", |
| 2466 | + "group": "", |
| 2467 | + "extraInformation": [], |
| 2468 | + "hidden": true, |
| 2469 | + "name": "ElevationLogSpeed" |
| 2470 | + }, |
2295 | 2471 | { |
2296 | 2472 | "value": "", |
2297 | 2473 | "type": "Number", |
|
2342 | 2518 | "extraInformation": [], |
2343 | 2519 | "name": "IsRotatingWithObject" |
2344 | 2520 | }, |
| 2521 | + { |
| 2522 | + "value": "false", |
| 2523 | + "type": "Boolean", |
| 2524 | + "label": "Automatically rotate the camera with the object (elevation)", |
| 2525 | + "description": "", |
| 2526 | + "group": "", |
| 2527 | + "extraInformation": [], |
| 2528 | + "name": "IsElevatingWithObject" |
| 2529 | + }, |
2345 | 2530 | { |
2346 | 2531 | "value": "0", |
2347 | 2532 | "type": "Number", |
|
2352 | 2537 | "extraInformation": [], |
2353 | 2538 | "hidden": true, |
2354 | 2539 | "name": "TargetedRotationAngle" |
| 2540 | + }, |
| 2541 | + { |
| 2542 | + "value": "0", |
| 2543 | + "type": "Number", |
| 2544 | + "unit": "DegreeAngle", |
| 2545 | + "label": "Targeted camera rotation angle", |
| 2546 | + "description": "When this angle is set, the camera follow this value instead of the object angle.", |
| 2547 | + "group": "", |
| 2548 | + "extraInformation": [], |
| 2549 | + "hidden": true, |
| 2550 | + "name": "TargetedElevationAngle" |
2355 | 2551 | } |
2356 | 2552 | ], |
2357 | 2553 | "sharedPropertyDescriptors": [] |
|
0 commit comments