没有合适的资源?快使用搜索试试~ 我知道了~
Trail Arc Renderer unity3d中的刀光剑影特效
需积分: 31 14 下载量 84 浏览量
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币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
- C语言实现直接插入排序、希尔排序、选择排序、冒泡排序、堆排序、快速排序、归并排序、计数排序,并带图详解.zip
- 常用工具集参考用于图像等数据处理
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功