整合SLSUtilities
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace SLSUtilities.Cinemachine
|
||||
{
|
||||
[AddComponentMenu("Cinemachine/Procedural/Extensions/Cinemachine Rotation Offset")]
|
||||
[ExecuteAlways]
|
||||
[SaveDuringPlay]
|
||||
public class CinemachineRotationOffset : CinemachineExtension
|
||||
{
|
||||
public Vector3 rotationOffset; // 你可以在这里控制 X 和 Y 的抖动
|
||||
|
||||
protected override void PostPipelineStageCallback(
|
||||
CinemachineVirtualCameraBase vcam,
|
||||
CinemachineCore.Stage stage, ref CameraState state, float deltaTime)
|
||||
{
|
||||
// 在最终的 Aim 阶段之后应用偏移
|
||||
if (stage == CinemachineCore.Stage.Aim)
|
||||
{
|
||||
state.RawOrientation *= Quaternion.Euler(rotationOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33f95c09786299649adc9bc587b77db6
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "SLSUtilities.Cinemachine",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:4307f53044263cf4b835bd812fc161a4"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54011f78fe0b65a40902b5084fa563d9
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user