浏览代码

Reworked the CM camera, added collider, noise

/main
Ciro Continisio 4 年前
当前提交
7438112a
共有 2 个文件被更改,包括 88 次插入57 次删除
  1. 141
      UOP1_Project/Assets/Prefabs/GameplayEssentials/CameraSystem.prefab
  2. 4
      UOP1_Project/Assets/Scripts/CameraManager.cs

141
UOP1_Project/Assets/Prefabs/GameplayEssentials/CameraSystem.prefab


m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 6, z: -10}
m_BindingMode: 4
m_FollowOffset: {x: 0, y: 7, z: -12}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1

m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 1, z: 0}
m_LookaheadTime: 0.5
m_LookaheadSmoothing: 15
m_LookaheadSmoothing: 20
m_VerticalDamping: 3
m_VerticalDamping: 1
m_SoftZoneWidth: 0.5
m_SoftZoneHeight: 0.5
m_SoftZoneWidth: 0.8
m_SoftZoneHeight: 0.8
m_CenterOnActivate: 1
m_CenterOnActivate: 0
--- !u!1 &1988373824387590796
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1988373824387590796}
m_LocalRotation: {x: 0.24919105, y: 0.035634924, z: -0.0091757765, w: 0.967755}
m_LocalRotation: {x: 0.22975291, y: 1e-45, z: -0, w: 0.973249}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_Lens:
FieldOfView: 40
OrthographicSize: 10
NearClipPlane: 0.1
NearClipPlane: 0.01
FarClipPlane: 2000
Dutch: 0
LensShift: {x: 0, y: 0}

m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 6, z: -10}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1
m_BindingMode: 4
m_FollowOffset: {x: 0, y: 7, z: -12}
m_XDamping: 0.1
m_YDamping: 0.1
m_ZDamping: 0.1
m_AngularDampingMode: 0
m_PitchDamping: 0
m_YawDamping: 0

m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 0, z: 0}
m_TrackedObjectOffset: {x: 0, y: 1, z: 0}
m_LookaheadSmoothing: 0
m_LookaheadSmoothing: 20
m_HorizontalDamping: 0
m_VerticalDamping: 0
m_HorizontalDamping: 0.1
m_VerticalDamping: 0.1
m_ScreenY: 0.6
m_ScreenY: 0.5
m_SoftZoneHeight: 0.8
m_SoftZoneHeight: 1
m_CenterOnActivate: 1
m_CenterOnActivate: 0
--- !u!1 &5124716108385545706
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5457523176376150323}
m_LocalRotation: {x: 0.22959733, y: 0.03581292, z: -0.008454285, w: 0.97258985}
m_LocalPosition: {x: 0.00000017881393, y: 0, z: 0}
m_LocalRotation: {x: 0.22975291, y: -8.268e-42, z: 1.959e-42, w: 0.973249}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5397738593588287248}

m_Lens:
FieldOfView: 40
OrthographicSize: 10
NearClipPlane: 0.1
NearClipPlane: 0.01
FarClipPlane: 2000
Dutch: 0
LensShift: {x: 0, y: 0}

m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 6, z: -10}
m_BindingMode: 4
m_FollowOffset: {x: 0, y: 7, z: -12}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1

m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 0, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 0
m_LookaheadIgnoreY: 0
m_TrackedObjectOffset: {x: 0, y: 1, z: 0}
m_LookaheadTime: 0.7
m_LookaheadSmoothing: 30
m_LookaheadIgnoreY: 1
m_ScreenY: 0.55
m_ScreenY: 0.5
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.8

m_CenterOnActivate: 1
m_CenterOnActivate: 0
--- !u!1 &6333144650067166509
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6333144650067166509}
m_LocalRotation: {x: 0.23159355, y: 0.03579549, z: -0.008527792, w: 0.9721165}
m_LocalRotation: {x: 0.22975291, y: -1e-45, z: -0, w: 0.973249}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_Lens:
FieldOfView: 40
OrthographicSize: 10
NearClipPlane: 0.1
NearClipPlane: 0.01
FarClipPlane: 2000
Dutch: 0
LensShift: {x: 0, y: 0}

inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
mainCamera: {fileID: 8745341642014614481}
freeLookVCam: {fileID: 8745341641394998849}
speed: 2
speed: 1
_cameraTransformAnchor: {fileID: 11400000, guid: bc205269957643647a8b5f98f028f9fb,
type: 2}
_frameObjectChannel: {fileID: 11400000, guid: 2723b3f59f7ede3498fe7e385d2bb6ee,

m_Component:
- component: {fileID: 8745341641394998850}
- component: {fileID: 8745341641394998849}
- component: {fileID: 643664704}
m_Layer: 0
m_Name: FreeLook_VCam
m_TagString: Untagged

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341641394998848}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.73544794, y: 6, z: -9.972919}
m_LocalPosition: {x: 0, y: 7, z: -12}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2955398947125553842}

m_Lens:
FieldOfView: 40
OrthographicSize: 10
NearClipPlane: 0.1
NearClipPlane: 0.01
FarClipPlane: 2000
Dutch: 0
LensShift: {x: 0, y: 0}

m_YAxis:
Value: 0.5
m_SpeedMode: 0
m_MaxSpeed: 80
m_MaxSpeed: 30
m_AccelTime: 0.5
m_DecelTime: 0.1
m_InputAxisName:

m_LegacyVelocityFilterStrength: -1
m_YAxisRecentering:
m_enabled: 1
m_WaitTime: 8
m_RecenteringTime: 4
m_WaitTime: 10
m_RecenteringTime: 30
m_MaxSpeed: 8000
m_MaxSpeed: 3000
m_AccelTime: 0.5
m_DecelTime: 0.1
m_InputAxisName:

m_Bias: 0
m_RecenterToTargetHeading:
m_enabled: 0
m_WaitTime: 1
m_RecenteringTime: 2
m_WaitTime: 10
m_RecenteringTime: 10
m_BindingMode: 5
m_SplineCurvature: 0.2
m_BindingMode: 4
m_SplineCurvature: 1
- m_Height: 10
m_Radius: 16.88
- m_Height: 6
m_Radius: 10
- m_Height: 1.5
m_Radius: 4.5
- m_Height: 15
m_Radius: 6
- m_Height: 7
m_Radius: 12
- m_Height: 0.4
m_Radius: 4
--- !u!114 &643664704
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341641394998848}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e501d18bb52cf8c40b1853ca4904654f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_CollideAgainst:
serializedVersion: 2
m_Bits: 2049
m_IgnoreTag:
m_TransparentLayers:
serializedVersion: 2
m_Bits: 4294967295
m_MinimumDistanceFromTarget: 0.01
m_AvoidObstacles: 1
m_DistanceLimit: 0
m_MinimumOcclusionTime: 0.1
m_CameraRadius: 0.3
m_Strategy: 0
m_MaximumEffort: 4
m_SmoothingTime: 0
m_Damping: 0.2
m_DampingWhenOccluded: 0.2
m_OptimalTargetDistance: 0
--- !u!1 &8745341642014614487
GameObject:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745341642014614487}
m_LocalRotation: {x: 0.24919103, y: 0.03563492, z: -0.009175778, w: 0.967755}
m_LocalPosition: {x: -0.73544794, y: 6, z: -9.972919}
m_LocalRotation: {x: 0.22975294, y: 1e-45, z: -0, w: 0.973249}
m_LocalPosition: {x: 0, y: 7, z: -12}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 28.97, y: 3.1000001, z: 0}
--- !u!20 &8745341642014614481
Camera:
m_ObjectHideFlags: 0

y: 0
width: 1
height: 1
near clip plane: 0.1
near clip plane: 0.01
far clip plane: 2000
field of view: 40
orthographic: 0

4
UOP1_Project/Assets/Scripts/CameraManager.cs


if (isDeviceMouse && !_isRMBPressed)
return;
freeLookVCam.m_XAxis.m_InputAxisValue = cameraMovement.x * Time.smoothDeltaTime * speed;
freeLookVCam.m_YAxis.m_InputAxisValue = cameraMovement.y * Time.smoothDeltaTime * speed;
freeLookVCam.m_XAxis.m_InputAxisValue = cameraMovement.x * Time.smoothDeltaTime * speed * 0.2f;
freeLookVCam.m_YAxis.m_InputAxisValue = cameraMovement.y * Time.smoothDeltaTime * speed * 0.2f;
}
private void OnFrameObjectEvent(Transform value)

正在加载...
取消
保存