Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowBrian committed Oct 8, 2023
1 parent a15b01f commit a647723
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
4 changes: 3 additions & 1 deletion Assets/PlayerController/PlayerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ private void UpdateMovement()
{
_yVelocity = Mathf.Max(_yVelocity - gravity * Time.deltaTime, -maxFallSpeed);
}
Vector3 velocity = Time.deltaTime * movementSpeed * (_camera.transform.forward * _movementInput.y + _camera.transform.right * _movementInput.x) + Time.deltaTime * _yVelocity * Vector3.up;
var fixedMoveInput = (_camera.transform.forward * _movementInput.y + _camera.transform.right * _movementInput.x);
fixedMoveInput.y = 0;
Vector3 velocity = Time.deltaTime * movementSpeed * fixedMoveInput + Time.deltaTime * _yVelocity * Vector3.up;
_controller.Move(velocity);
if (_controller.isGrounded)
{
Expand Down
23 changes: 0 additions & 23 deletions Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -6658,7 +6658,6 @@ GameObject:
- component: {fileID: 1009849306}
- component: {fileID: 1009849309}
- component: {fileID: 1009849308}
- component: {fileID: 1009849307}
m_Layer: 5
m_Name: Plane
m_TagString: Untagged
Expand Down Expand Up @@ -6686,28 +6685,6 @@ RectTransform:
m_AnchoredPosition: {x: 0.00002924651, y: 0.000022351742}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!64 &1009849307
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1009849305}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1009849308
MeshRenderer:
m_ObjectHideFlags: 0
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/Camera/CameraPhone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ public void TakePicture()

foreach (var obj in Capturable.Rendered)
{
var objectScreenPoint = _camera.WorldToScreenPoint(obj.transform.position);
var objectScreenPoint = Camera.main.WorldToScreenPoint(obj.transform.position);
RaycastHit hit;
bool captured = _screenshotRect.Contains(objectScreenPoint) && (!Physics.Linecast(_camera.transform.position, obj.transform.position, out hit, layerMask) || hit.collider == obj.Collider);
bool captured = _screenshotRect.Contains(objectScreenPoint) && (!Physics.Linecast(Camera.main.transform.position, obj.transform.position, out hit, layerMask) || hit.collider == obj.Collider);
if (captured)
{
CollectionManager.AddPhoto(obj, _screenshots.Count);
Expand Down
5 changes: 4 additions & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ PlayerSettings:
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 0.1.0
preloadedAssets: []
preloadedAssets:
- {fileID: -5963595683808390435, guid: 4beec197c0b9dd9439a0e9d8f75e0556, type: 2}
- {fileID: 11400000, guid: 9adff3a04439f174e9f2b5f0b85b9164, type: 2}
- {fileID: 5214699472457183567, guid: 9cd3c805a06a0f34da7e1bce6559f296, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
Expand Down
6 changes: 3 additions & 3 deletions ProjectSettings/QualitySettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
QualitySettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_CurrentQuality: 1
m_CurrentQuality: 0
m_QualitySettings:
- serializedVersion: 3
name: Performant
Expand Down Expand Up @@ -126,7 +126,7 @@ QualitySettings:
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
useLegacyDetailDistribution: 1
vSyncCount: 1
vSyncCount: 0
lodBias: 2
maximumLODLevel: 0
enableLODCrossFade: 1
Expand Down Expand Up @@ -165,7 +165,7 @@ QualitySettings:
PS5: 2
Server: 0
Stadia: 2
Standalone: 2
Standalone: 0
WebGL: 1
Windows Store Apps: 2
XboxOne: 2
Expand Down

0 comments on commit a647723

Please sign in to comment.