没有合适的资源?快使用搜索试试~ 我知道了~
Trail Arc Renderer unity3d中的刀光剑影特效
需积分: 31 14 下载量 60 浏览量
2017-09-21
17:36:07
上传
评论
收藏 10KB TXT 举报
温馨提示
试读
14页
Alright, this is my last trail renderer I will post (wink). This trail renderer is designed specifically with melee trails in mind. It will track the path of its parent object and create a fluid arc between its saved points. You can set the distance between saved points, which gives you control over the accuracy of the interpolation. Increasing distance will produce more smoothed out arcs, where reducing distance will increase accuracy to the actual path.
资源推荐
资源详情
资源评论
Trail Arc Renderer unity3d中的刀光剑影特效
Description
Alright, this is my last trail renderer I will post (wink). This trail renderer is designed specifically with melee trails in mind. It will track the path of its parent object and create a fluid arc between its saved points. You can set the distance between saved points, which gives you control over the accuracy of the interpolation. Increasing distance will produce more smoothed out arcs, where reducing distance will increase accuracy to the actual path.
Features
?Set the fade out time (lifetime) when the trail is done emitting
?Control when its done by simply turning off the "emit" property
?Set any number of colors
?Set any number of widths
?Autodestructs when faded out
?Set the interpolation distance
?Set whether it always faces the camera
?Set the number of segments to place between each interpolation distance
One-Time Use
This trail renderer is designed to be a one-time use component. There are several reasons for this, based on the way it is designed for optimization. When emitting is set to false, the trail renderer will stop adding new segments and fade out. The fade out time is set to the lifetime.
Trail Arc Renderer unity3d中的刀光剑影特效 - LoffyOu - Fayes blog
C# - TrailArc.cs
using UnityEngine;
using System.Collections;
public class TrailArc : MonoBehaviour
{
int savedIndex;
int pointIndex;
// Material - Particle Shader with "Tint Color" property
public Material material;
// Emit
public bool emit
{
get { return Emit; }
set { Emit = value; }
}
bool Emit = true;
bool emittingDone = false;
//Minimum velocity (script terminates)
public float minVel = 10;
// Facing
public bool faceCamera = true;
// Lifetime of each segment
public float lifetime = 1;
using System.Collections;
public class TrailArc : MonoBehaviour
{
int savedIndex;
int pointIndex;
// Material - Particle Shader with "Tint Color" property
public Material material;
// Emit
public bool emit
{
get { return Emit; }
set { Emit = value; }
}
bool Emit = true;
bool emittingDone = false;
//Minimum velocity (script terminates)
public float minVel = 10;
// Facing
public bool faceCamera = true;
// Lifetime of each segment
public float lifetime = 1;
剩余13页未读,继续阅读
资源评论
alexyuanlei
- 粉丝: 4
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功