changed weapon

This commit is contained in:
2022-04-12 14:05:55 +07:00
parent 25cd6df71b
commit 95f61ab7e2
7 changed files with 211 additions and 253 deletions

View File

@ -1 +1 @@
{"count":1,"self":37.360576,"total":37.5098297,"children":{"InitializeActuators":{"count":1,"self":0.0009976,"total":0.0009976,"children":null},"AgentSendState":{"count":1566,"self":0.0244326,"total":0.0244326,"children":null},"DecideAction":{"count":1566,"self":0.1208305,"total":0.1208305,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1649740378","unity_version":"2019.4.36f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2019.4.36f1\\Editor\\Unity.exe -projectpath D:\\real-shooter-git -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-user -hubSessionId cd9a8190-ba14-11ec-a0c5-63621669bd08 -accessToken 1o07z9cTg16d5JsIaxEBFdNKzAhY1SajgTdTHeOQ360012f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Greatest_map_ever","end_time_seconds":"1649740416"}} {"count":1,"self":19.9775968,"total":20.018629999999998,"children":{"InitializeActuators":{"count":1,"self":0.0010006,"total":0.0010006,"children":null},"AgentSendState":{"count":765,"self":0.0057472999999999995,"total":0.0057472999999999995,"children":null},"DecideAction":{"count":765,"self":0.0332866,"total":0.0332866,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1649742457","unity_version":"2019.4.35f1","command_line_arguments":"D:\\Unity\\2019.4.35f1\\Editor\\Unity.exe -projectpath C:\\Users\\kiril\\real-shooter -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-kiril -hubSessionId 21e9de90-ba14-11ec-9398-079edccf5e34 -accessToken oIpf_7gKWQQRilVTeJehUsFhrxasdzsG_K3j5Swtgx0009f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Greatest_map_ever","end_time_seconds":"1649742477"}}

View File

@ -1 +1 @@
{"count":1,"self":14.5494256,"total":14.5766034,"children":{"InitializeActuators":{"count":1,"self":0,"total":0,"children":null},"AgentSendState":{"count":497,"self":0.0020012999999999997,"total":0.0020012999999999997,"children":null},"DecideAction":{"count":497,"self":0.0241768,"total":0.0241768,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1649741696","unity_version":"2019.4.35f1","command_line_arguments":"D:\\Unity\\2019.4.35f1\\Editor\\Unity.exe -projectpath C:\\Users\\kiril\\real-shooter -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-kiril -hubSessionId 21e9de90-ba14-11ec-9398-079edccf5e34 -accessToken oIpf_7gKWQQRilVTeJehUsFhrxasdzsG_K3j5Swtgx0009f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"dont touch me plz","end_time_seconds":"1649741711"}} {"count":1,"self":10.4549528,"total":10.4648434,"children":{"InitializeActuators":{"count":1,"self":0.0009976,"total":0.0009976,"children":null},"AgentSendState":{"count":288,"self":0.0029771,"total":0.0029771,"children":null},"DecideAction":{"count":288,"self":0.0049163,"total":0.0049163,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1649746841","unity_version":"2019.4.35f1","command_line_arguments":"D:\\Unity\\2019.4.35f1\\Editor\\Unity.exe -projectpath C:\\Users\\kiril\\real-shooter -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-kiril -hubSessionId 21e9de90-ba14-11ec-9398-079edccf5e34 -accessToken oIpf_7gKWQQRilVTeJehUsFhrxasdzsG_K3j5Swtgx0009f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"dont touch me plz","end_time_seconds":"1649746852"}}

View File

@ -212,8 +212,97 @@ Transform:
m_LocalScale: {x: 100, y: 1, z: 100} m_LocalScale: {x: 100, y: 1, z: 100}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &440413021
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalPosition.x
value: 28.21
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalPosition.y
value: 10.9
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalPosition.z
value: 46.67
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480125, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_Name
value: Player
objectReference: {fileID: 0}
- target: {fileID: 8510909888689775086, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: settings.MovementSwayX
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8510909888689775086, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: settings.MovementSwayY
value: 2
objectReference: {fileID: 0}
- target: {fileID: 8510909888689775086, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: settings.MovementSwaySmoothing
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8510909888689775086, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: settings.MovementSwayYInverted
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 80f6c1c85e5daed4c96c70205ed5503d, type: 3}
--- !u!1 &676942498 --- !u!1 &676942498
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -304,157 +393,5 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &1991868003
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1991868006}
- component: {fileID: 1991868005}
- component: {fileID: 1991868004}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1991868004
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1991868003}
m_Enabled: 1
--- !u!20 &1991868005
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1991868003}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1991868006
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1991868003}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &8510909887784509496
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalPosition.x
value: 32.94
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalPosition.y
value: 10.9
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalPosition.z
value: 46.67
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480103, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5245491127989480125, guid: 80f6c1c85e5daed4c96c70205ed5503d,
type: 3}
propertyPath: m_Name
value: Player
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 80f6c1c85e5daed4c96c70205ed5503d, type: 3}

View File

@ -363,99 +363,6 @@ Transform:
m_Father: {fileID: 5245491127989480103} m_Father: {fileID: 5245491127989480103}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8510909888198732725
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8510909888198732726}
- component: {fileID: 8510909888198732713}
- component: {fileID: 8510909888198732712}
- component: {fileID: 8510909888198732727}
m_Layer: 8
m_Name: WeaponModel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8510909888198732726
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8510909888198732725}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8510909888689775087}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8510909888198732713
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8510909888198732725}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &8510909888198732712
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8510909888198732725}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &8510909888198732727
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8510909888198732725}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &8510909888689775085 --- !u!1 &8510909888689775085
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -482,9 +389,9 @@ Transform:
m_GameObject: {fileID: 8510909888689775085} m_GameObject: {fileID: 8510909888689775085}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.332, y: 0.038, z: 0.394} m_LocalPosition: {x: 0.332, y: 0.038, z: 0.394}
m_LocalScale: {x: 0.16226998, y: 0.1581135, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 8510909888198732726} - {fileID: 4936565370263846416}
m_Father: {fileID: 5245491129196666053} m_Father: {fileID: 5245491129196666053}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -508,3 +415,93 @@ MonoBehaviour:
SwayResetSmoothing: 0.1 SwayResetSmoothing: 0.1
SwayClampX: 8 SwayClampX: 8
SwayClampY: 8 SwayClampY: 8
--- !u!1001 &142004959385982218
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 8510909888689775087}
m_Modifications:
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalScale.x
value: 0.12767105
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalScale.y
value: 0.12767106
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalScale.z
value: 0.12767103
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.098
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.25399977
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.485
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -927199367670048503, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
propertyPath: m_Name
value: AKM
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8, type: 3}
--- !u!4 &4936565370263846416 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8,
type: 3}
m_PrefabInstance: {fileID: 142004959385982218}
m_PrefabAsset: {fileID: 0}

View File

@ -11,7 +11,8 @@ public class scr_CharacterController : MonoBehaviour
private CharacterController characterController; private CharacterController characterController;
private DefaultInput defaultInput; private DefaultInput defaultInput;
private Vector2 input_Movement; [HideInInspector]
public Vector2 input_Movement;
[HideInInspector] [HideInInspector]
public Vector2 input_View; public Vector2 input_View;
@ -119,6 +120,7 @@ public class scr_CharacterController : MonoBehaviour
} }
// Effectors // Effectors
if (!characterController.isGrounded) if (!characterController.isGrounded)
{ {
playerSettings.SpeedEffector = playerSettings.FallingSpeedEffector; playerSettings.SpeedEffector = playerSettings.FallingSpeedEffector;

View File

@ -61,7 +61,7 @@ public static class scr_Models
[Serializable] [Serializable]
public class WeaponSettingsModel public class WeaponSettingsModel
{ {
[Header("Sway")] [Header("Weapon Sway")]
public float SwayAmount; public float SwayAmount;
public bool SwayYInverted; public bool SwayYInverted;
public bool SwayXInverted; public bool SwayXInverted;
@ -69,6 +69,13 @@ public static class scr_Models
public float SwayResetSmoothing; public float SwayResetSmoothing;
public float SwayClampX; public float SwayClampX;
public float SwayClampY; public float SwayClampY;
[Header("Weapon Movement Sway")]
public float MovementSwayX;
public float MovementSwayY;
public bool MovementSwayYInverted;
public bool MovementSwayXInverted;
public float MovementSwaySmoothing;
} }
#endregion #endregion

View File

@ -15,6 +15,12 @@ public class scr_WeaponController : MonoBehaviour
Vector3 targetWeaponRotation; Vector3 targetWeaponRotation;
Vector3 targetWeaponRotationVelocity; Vector3 targetWeaponRotationVelocity;
Vector3 newWeaponMovementRotation;
Vector3 newWeaponRotationMovementVelocity;
Vector3 targetWeaponMovementRotation;
Vector3 targetWeaponMovementRotationVelocity;
private void Start() private void Start()
{ {
newWeaponRotation = transform.localRotation.eulerAngles; newWeaponRotation = transform.localRotation.eulerAngles;
@ -40,9 +46,18 @@ public class scr_WeaponController : MonoBehaviour
targetWeaponRotation.x = Mathf.Clamp(targetWeaponRotation.x, -settings.SwayClampX, settings.SwayClampX); targetWeaponRotation.x = Mathf.Clamp(targetWeaponRotation.x, -settings.SwayClampX, settings.SwayClampX);
targetWeaponRotation.y = Mathf.Clamp(targetWeaponRotation.y, -settings.SwayClampY, settings.SwayClampY); targetWeaponRotation.y = Mathf.Clamp(targetWeaponRotation.y, -settings.SwayClampY, settings.SwayClampY);
targetWeaponRotation.z = targetWeaponRotation.y;
targetWeaponRotation = Vector3.SmoothDamp(targetWeaponRotation, Vector3.zero, ref targetWeaponRotationVelocity, settings.SwayResetSmoothing); targetWeaponRotation = Vector3.SmoothDamp(targetWeaponRotation, Vector3.zero, ref targetWeaponRotationVelocity, settings.SwayResetSmoothing);
newWeaponRotation = Vector3.SmoothDamp(newWeaponRotation, targetWeaponRotation, ref newWeaponRotationVelocity, settings.SwaySmoothing); newWeaponRotation = Vector3.SmoothDamp(newWeaponRotation, targetWeaponRotation, ref newWeaponRotationVelocity, settings.SwaySmoothing);
targetWeaponMovementRotation.z = settings.MovementSwayX * (settings.MovementSwayXInverted ? -characterController.input_Movement.x : characterController.input_Movement.x);
targetWeaponMovementRotation.x = settings.MovementSwayY * (settings.MovementSwayYInverted ? -characterController.input_Movement.y : characterController.input_Movement.y);
targetWeaponMovementRotation = Vector3.SmoothDamp(targetWeaponMovementRotation, Vector3.zero, ref targetWeaponMovementRotationVelocity, settings.SwayResetSmoothing);
newWeaponMovementRotation = Vector3.SmoothDamp(newWeaponRotation, targetWeaponMovementRotation, ref newWeaponRotationVelocity, settings.SwaySmoothing);
transform.localRotation = Quaternion.Euler(newWeaponRotation); transform.localRotation = Quaternion.Euler(newWeaponRotation);
} }
} }