using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class zhendong : MonoBehaviour
{
private Vector3 _lastPosition;
private Vector3 _lastRotation;
public Vector3 MaximumTranslationShake = Vector3.one * .75f;
public float shake;
public float _trauma;
float time = 0;
public float TraumaExponent = 1;
public Vector3 MaximumAngularShake = Vector3.one * 5;
public Transform o;
public float MaxLevel = 0.4f;
float Stress=0;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
var previousRotation = _lastRotation;
var previousPosition = _lastPosition;
time += Time.deltaTime;
Stress += 0.001F;
_trauma = Mathf.Clamp01(_trauma + Stress);
//设置位移幅度
if (_trauma <= MaxLevel)
{
_trauma = time * 0.1f;
print("1");
}
else
{

831

被折叠的 条评论
为什么被折叠?



