Unity Chan 工程分享 - URP渲染实现 Unity版本:2019.4
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
641 B

using UnityEngine;
namespace Unity.Animations.SpringBones
{
public class ForceVolume : ForceProvider
{
public float strength = 0.01f;
public override Vector3 GetForceOnBone(SpringBone springBone)
{
return strength * transform.forward;
}
// private
private void OnDrawGizmos()
{
const float DrawScale = 10f;
var origin = transform.position;
var destination = origin + strength * DrawScale * transform.forward;
GizmoUtil.DrawArrow(origin, destination, Color.gray, 0.1f);
}
}
}