Skip to content

[3D First person] Add a camera icon and tweak speeds #534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 33 additions & 31 deletions examples/3d-first-person/3d-first-person.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,15 @@
"identifier": "https://asset-resources.gdevelop.io/public-resources/Multitouch joysticks/13d8225be69d0f11b6de965cac0d840e7e63e2510a638af89ae42b052caa2460_Shaded dark joystick thumb.png",
"name": "Shaded dark joystick thumb.png"
}
},
{
"alwaysLoaded": false,
"file": "Camera.png",
"kind": "image",
"metadata": "",
"name": "Camera.png",
"smoothed": true,
"userAdded": true
}
],
"resourceFolders": []
Expand Down Expand Up @@ -476,20 +485,20 @@
],
"instances": [
{
"angle": 180,
"angle": 202,
"customSize": true,
"height": 20,
"height": 40,
"layer": "",
"name": "Camera",
"persistentUuid": "b47b3320-fbbb-473d-8e2a-9eb5497c56f0",
"width": 20,
"width": 40,
"x": 475,
"y": 301,
"y": 325,
"zOrder": 2,
"numberProperties": [
{
"name": "depth",
"value": 0
"value": 1
},
{
"name": "z",
Expand Down Expand Up @@ -1022,14 +1031,14 @@
"depth": 100,
"enableTextureTransparency": false,
"facesOrientation": "Y",
"frontFaceResourceName": "",
"frontFaceResourceName": "Camera.png",
"backFaceResourceName": "",
"backFaceUpThroughWhichAxisRotation": "X",
"leftFaceResourceName": "",
"rightFaceResourceName": "",
"topFaceResourceName": "",
"bottomFaceResourceName": "",
"frontFaceVisible": false,
"frontFaceVisible": true,
"backFaceVisible": false,
"leftFaceVisible": false,
"rightFaceVisible": false,
Expand Down Expand Up @@ -1295,8 +1304,7 @@
"textG": 0,
"textR": 0
},
"comment": "Camera object rotates along with the player's cursor, and the in game camera rotates based on the position of the Camera object",
"comment2": ""
"comment": "Camera object rotates along with the player's cursor, and the in game camera rotates based on the position of the Camera object"
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1402,7 +1410,7 @@
"parameters": [
"Camera",
"+",
"LookJoystick.StickForceX()"
"LookJoystick.StickForceX() * 4"
]
},
{
Expand All @@ -1412,7 +1420,7 @@
"parameters": [
"Camera",
"+",
"LookJoystick.StickForceY()"
"LookJoystick.StickForceY() * 2"
]
}
]
Expand All @@ -1439,7 +1447,7 @@
"parameters": [
"Camera",
"+",
"Gamepads::StickForceX(1, \"Right\")"
"Gamepads::StickForceX(1, \"Right\") * 4"
]
},
{
Expand All @@ -1449,7 +1457,7 @@
"parameters": [
"Camera",
"+",
"Gamepads::StickForceY(1, \"Right\")"
"Gamepads::StickForceY(1, \"Right\") * 2"
]
}
]
Expand All @@ -1464,8 +1472,7 @@
"textG": 0,
"textR": 0
},
"comment": "Make sure the camera doesn't get upsidedown.",
"comment2": ""
"comment": "Make sure the camera doesn't get upsidedown."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1522,8 +1529,7 @@
"textG": 0,
"textR": 0
},
"comment": "To allow player to walk under an object, it needs to be neglected from picking when separating from obstacles",
"comment2": ""
"comment": "To allow player to walk under an object, it needs to be neglected from picking when separating from obstacles"
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1562,8 +1568,7 @@
"textG": 0,
"textR": 0
},
"comment": "Moving the Camera object along the X/Y plane with forces",
"comment2": ""
"comment": "Moving the Camera object along the X/Y plane with forces"
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1599,7 +1604,7 @@
"parameters": [
"Camera",
"Camera.Angle()",
"200",
"400",
""
]
}
Expand All @@ -1626,7 +1631,7 @@
"parameters": [
"Camera",
"Camera.Angle()+180",
"200",
"400",
""
]
}
Expand All @@ -1653,7 +1658,7 @@
"parameters": [
"Camera",
"Camera.Angle() + 90",
"200",
"400",
""
]
}
Expand All @@ -1680,7 +1685,7 @@
"parameters": [
"Camera",
"Camera.Angle() - 90",
"200",
"400",
""
]
}
Expand Down Expand Up @@ -1715,7 +1720,7 @@
"parameters": [
"Camera",
"WalkJoystick.StickAngle() + Camera.Angle() + 90",
"200",
"400",
""
]
}
Expand Down Expand Up @@ -1756,7 +1761,7 @@
"parameters": [
"Camera",
"Gamepads::StickAngle(1, \"Left\") + Camera.Angle() + 90",
"200",
"400",
""
]
}
Expand Down Expand Up @@ -6371,8 +6376,7 @@
"textG": 0,
"textR": 0
},
"comment": "Make sure the joystick has moved from center",
"comment2": ""
"comment": "Make sure the joystick has moved from center"
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -6452,8 +6456,7 @@
"textG": 0,
"textR": 0
},
"comment": "Make sure the joystick has moved from center",
"comment2": ""
"comment": "Make sure the joystick has moved from center"
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -7085,8 +7088,7 @@
"textG": 0,
"textR": 0
},
"comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)",
"comment2": ""
"comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)"
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down
Binary file added examples/3d-first-person/Camera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.