diff --git a/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity b/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity index 09c624c3a..8b3b862eb 100644 --- a/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity +++ b/Assets/AWSIM/Scenes/Composition/AWSIMSimulation.unity @@ -643,8 +643,6 @@ MonoBehaviour: m_EditorClassIdentifier: _cardTopBarButton: {fileID: 1260265816} _barChevronRect: {fileID: 1997208415} - _chevronExpandedDegrees: 90 - _chevronCollapsedDegrees: 0 _isCardOpen: 1 ElementHeight: 30 ElementSpacing: 5 @@ -791,6 +789,7 @@ Transform: - {fileID: 1232284682541564030} - {fileID: 1232284682054556268} - {fileID: 1955430582} + - {fileID: 1150880498} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &131919678 @@ -3784,8 +3783,6 @@ MonoBehaviour: m_EditorClassIdentifier: _cardTopBarButton: {fileID: 830995974} _barChevronRect: {fileID: 933050327} - _chevronExpandedDegrees: 90 - _chevronCollapsedDegrees: 0 _isCardOpen: 1 ElementHeight: 30 ElementSpacing: 5 @@ -4653,8 +4650,8 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1668138103} m_HandleRect: {fileID: 1668138102} m_Direction: 2 - m_Value: 1 - m_Size: 0.75574714 + m_Value: 0 + m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -5516,8 +5513,6 @@ MonoBehaviour: m_EditorClassIdentifier: _cardTopBarButton: {fileID: 1046157539} _barChevronRect: {fileID: 412352509} - _chevronExpandedDegrees: 90 - _chevronCollapsedDegrees: 0 _isCardOpen: 1 ElementHeight: 30 ElementSpacing: 5 @@ -5769,6 +5764,221 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 985529871} m_CullTransparentMesh: 1 +--- !u!1 &1028782402 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1028782403} + - component: {fileID: 1028782410} + - component: {fileID: 1028782409} + - component: {fileID: 1028782408} + - component: {fileID: 1028782407} + - component: {fileID: 1028782406} + - component: {fileID: 1028782405} + - component: {fileID: 1028782404} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1028782403 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1150880498} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1542919678 &1028782404 +StreamingController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + m_Enabled: 1 + m_StreamingMipmapBias: 1 +--- !u!114 &1028782405 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 0 + priority: 2 + blendDistance: 0 + weight: 0.7 + sharedProfile: {fileID: 11400000, guid: 5a38341ed3c2637fbbc507134841f2ae, type: 2} +--- !u!65 &1028782406 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 0.5, y: 0.5, z: 0.5} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &1028782407 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 0 + m_RequiresOpaqueTextureOption: 0 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 1 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 +--- !u!114 &1028782408 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 555e395f453a79e44b909d2fd10efc05, type: 3} + m_Name: + m_EditorClassIdentifier: + target: {fileID: 0} + Distance: 5.48 + Offset: 0 + Height: 2.82 + HeightMultiplier: 0.5 + RotateAroundModeToggle: 99 + RotateAroundSensitivity: 16 + HeightAdjustmentSensitivity: 1 + ZoomSensitivity: 200 + InvertHorzAxis: 0 + InvertVertAxis: 0 + InvertScrollWheel: 0 + MaxHeight: 10 + MinDistance: 1 + MaxDistance: 20 +--- !u!81 &1028782409 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + m_Enabled: 1 +--- !u!20 &1028782410 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1028782402} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + 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!1 &1037837058 GameObject: m_ObjectHideFlags: 0 @@ -6436,6 +6646,156 @@ MonoBehaviour: m_BoolArgument: 0 m_CallState: 2 m_IsOn: 1 +--- !u!1 &1150880497 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1150880498} + - component: {fileID: 1150880499} + m_Layer: 0 + m_Name: Camera Controller + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1150880498 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1150880497} + serializedVersion: 2 + m_LocalRotation: {x: 0.22057624, y: -0.27639782, z: 0.06533767, w: 0.93310314} + m_LocalPosition: {x: 231.1, y: 5.9, z: -288.9} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1028782403} + m_Father: {fileID: 120471358} + m_LocalEulerAnglesHint: {x: 26.6, y: -33, z: 0} +--- !u!114 &1150880499 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1150880497} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1403093141, guid: b8873f7cd5fec6f49a4b37228b9b23ac, type: 3} + m_Name: + m_EditorClassIdentifier: + mode: 1 + target: {fileID: 0} + changeCameraKey: 99 + customCameraIndex: 0 + timeMode: 1 + driverCameraFov: 75 + driver: + hotKey: 282 + attachTarget: {fileID: 0} + enableRotation: 0 + resetRotationOnEnable: 0 + requireKeyPressedToRotate: 0 + keyToRequire: 324 + lookAtTarget: {fileID: 0} + horizontal: + angle: 0 + mode: 1 + targetOffset: 0 + damped: 1 + damping: 4 + clamped: 1 + minAngle: -90 + maxAngle: 90 + vertical: + angle: 0 + mode: 1 + targetOffset: 0 + damped: 1 + damping: 4 + clamped: 1 + minAngle: -60 + maxAngle: 60 + horizontalAxis: Mouse X + verticalAxis: Mouse Y + horizontalSensitivity: 4 + verticalSensitivity: 4 + smoothFollow: + hotKey: 283 + distance: 10 + height: 3.5 + heightMultiplier: 1 + heightDamping: 4.25 + rotationDamping: 3 + followVelocity: 1 + velocityDamping: 5 + orbit: + hotKey: 284 + distance: 14 + minVerticalAngle: 1.8 + maxVerticalAngle: 70 + horizontalSpeed: 5 + verticalSpeed: 2.5 + orbitDamping: 4 + minDistance: 3.8 + maxDistance: 50 + distanceSpeed: 10 + distanceDamping: 4 + requireKeyPressed: 0 + requiredKey: 324 + horizontalAxis: Mouse X + verticalAxis: Mouse Y + distanceAxis: Mouse ScrollWheel + lookAt: + hotKey: 285 + damping: 8 + adjustFov: 1 + minFov: 1 + maxFov: 60 + fovSpeed: 20 + fovDamping: 4 + autoFov: 1 + targetRadius: 5 + targetRadiusSpeed: 5 + adjustNearPlane: 0 + nearPlaneAtMinFov: 1.5 + fovAxis: Mouse ScrollWheel + enableMovement: 0 + movementSpeed: 10 + movementDamping: 5 + forwardAxis: Forwards + sidewaysAxis: Sideways + upwardsAxis: Upwards + free: + hotKey: 0 + minVerticalAngle: -60 + maxVerticalAngle: 60 + horizontalSpeed: 4 + verticalSpeed: 2 + damping: 4 + adjustFov: 1 + minFov: 10 + maxFov: 60 + fovSpeed: 20 + fovDamping: 4 + adjustNearPlane: 0 + nearPlaneAtMinFov: 1.5 + horizontalAxis: Mouse X + verticalAxis: Mouse Y + fovAxis: Mouse ScrollWheel + enableMovement: 0 + movementSpeed: 2 + movementDamping: 5 + forwardAxis: Forwards + sidewaysAxis: Sideways + upwardsAxis: Upwards --- !u!1 &1199477678 GameObject: m_ObjectHideFlags: 0 @@ -8744,8 +9104,6 @@ MonoBehaviour: m_EditorClassIdentifier: _cardTopBarButton: {fileID: 1558295553} _barChevronRect: {fileID: 1538985887} - _chevronExpandedDegrees: 90 - _chevronCollapsedDegrees: 0 _isCardOpen: 1 ElementHeight: 30 ElementSpacing: 5 diff --git a/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs b/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs index 1429cc733..4812e3484 100644 --- a/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs +++ b/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs @@ -58,6 +58,7 @@ public class AutowareVPPAdapter : MonoBehaviour // VPP components private VPVehicleController _vehicleController; private VPStandardInput _standardInput; + private VPCameraController _cameraController; [SerializeField] private VPWheelCollider[] _frontWheels; @@ -120,6 +121,10 @@ private void Start() _vehicleController = GetComponent(); _standardInput = GetComponent(); _rigidbody = GetComponent(); + + // set camera target to this vehicle + _cameraController = FindObjectOfType(); + _cameraController.target = transform; InitializeControlModes();