资源简介
unity3d 带有履带效果的坦克 学习开发必备 非常逼真
代码片段和文件信息
using UnityEngine;
using System.Collections;
public class AnimationSpline
{
public AnimationCurve _curveX;
public AnimationCurve _curveY;
public AnimationCurve _curveZ;
public AnimationCurve curveX
{
get {return this._curveX;}
}
public AnimationCurve curveY
{
get {return this._curveY;}
}
public AnimationCurve curveZ
{
get {return this._curveZ;}
}
private SplineKeyframe[] _keys;
private float tracksDisplacement = 0.0f;
public AnimationSpline (WrapMode wrapMode)
{
CreateSpline (wrapMode);
}
public AnimationSpline (WrapMode wrapMode SplineKeyframe[] keys)
{
CreateSpline (wrapMode);
SetKeys(keys);
}
private void CreateSpline (WrapMode wrapMode)
{
_curveX = new AnimationCurve();
_curveY = new AnimationCurve();
_curveZ = new AnimationCurve();
SetWrapMode(wrapMode);
}
public void SetWrapMode(WrapMode wrapMode)
{
_curveX.preWrapMode = wrapMode;
_curveX.postWrapMode = wrapMode;
_curveY.preWrapMode = wrapMode;
_curveY.postWrapMode = wrapMode;
_curveZ.preWrapMode = wrapMode;
_curveZ.postWrapMode = wrapMode;
}
public void AddKey (SplineKeyframe valueKeyframe)
{
_curveX.AddKey(valueKeyframe.time valueKeyframe.valueX);
_curveY.AddKey(valueKeyframe.time valueKeyframe.valueY);
_curveZ.AddKey(valueKeyframe.time valueKeyframe.valueZ);
}
public void AddKey (float time float valueX float valueY float valueZ)
{
_curveX.AddKey(time valueX);
_curveY.AddKey(time valueY);
_curveZ.AddKey(time valueZ);
}
public void AddKey (float time Vector3 valueKeyframe)
{
_curveX.AddKey(time valueKeyframe.x);
_curveY.AddKey(time valueKeyframe.y);
_curveZ.AddKey(time valueKeyframe.z);
}
public void SmoothTangents (int index float weight)
{
_curveX.SmoothTangents(index weight);
_curveY.SmoothTangents(index weight);
_curveZ.SmoothTangents(index weight);
}
public void Smooth ()
{
for(int i = 0; i < this.length; i ++)
this.SmoothTangents(i0.0f);
}
public Vector3 GetTangentsVector (float time float kaeficient)
{
Vector3 pos0;
Vector3 pos;
float delta = kaeficient;
pos0 = Evaluate(time);
pos = Evaluate(time + delta);
return (1.0f/delta)*(pos - pos0);
}
public Vector3 GetNormalVector(float time float kaeficient)
{
Vector3 norm0;
Vector3 norm;
float delta = kaeficient;
norm0 = GetTangentsVector(time delta).normalized;
norm = GetTangentsVector(time + delta delta).normalized;
return ((1.0f/delta)*(norm - norm0)).normalized;
}
public void RemoveKey (int index)
{
_curveX.RemoveKey(index);
_curveY.RemoveKey(index);
_curveZ.RemoveKey(index);
}
public SplineKeyframe[] keys
{
get {return this._keys;}
set
{
SetKeys(value);
}
}
private void SetKeys (SplineKeyframe[] valueKeyframe )
{
this._keys = valueKeyframe;
int _length = length;
Keyframe[] KeyframeX = new Keyframe[_length];
Keyframe[] KeyframeY = new Keyframe[_length];
Keyframe[] KeyframeZ = new Keyframe[_length];
for(int i = 0; i < _length; i+
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-01-22 16:38 012Tank Track Simulator AAAAA\
文件 1151333 2015-01-22 16:38 012Tank Track Simulator AAAAA\1.PNG
目录 0 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\
目录 0 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\
目录 0 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\
文件 4216 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Barrier.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Barrier.mat.me
文件 4212 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Body.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Body.mat.me
文件 4216 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Ground.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Ground.mat.me
文件 4220 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Invisible.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Invisible.mat.me
文件 4212 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Rock.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Rock.mat.me
文件 4216 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Spring.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Spring.mat.me
文件 4216 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Track.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Track.mat.me
文件 4220 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\TrackPoint.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\TrackPoint.mat.me
文件 4216 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Wheel.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Wheel.mat.me
文件 4212 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Wood.mat
文件 95 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials\Wood.mat.me
文件 107 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Materials.me
目录 0 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Meshes\
文件 21264 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Meshes\BarrierMesh.fbx
文件 1557 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Meshes\BarrierMesh.fbx.me
文件 81424 2013-07-22 03:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Meshes\Ground.fbx
文件 1742 2015-01-22 16:33 012Tank Track Simulator AAAAA\Assets\TankTrackSimulator\Meshes\Ground.fbx.me
............此处省略726个文件信息
相关资源
- unity Magica Cloth.1.7.0.zip
- Unity3D 轻松回放插件 EZReplayManager V1.
- Unity3D给力材质包
- unity3d太空射击游戏源码修改后的
- 拼图小游戏.zip
- Unity3D游戏开发vr插件CardboardSDKForUnit
- Unity3D 2018 最新最全800个脚本教程
- 赛车游戏 unity3d
- Unity3D PuppetMaster 布娃娃系统 骨骼动画
- UNITY3D 吃豆人 源码下载263056
- Unity3D 自定义树组件树形菜单
- 传智播客Unity3D视频教程— 6-传智播客
- Unity3D真实地形提取插件
- Monster.unitypackage
- unity3D汽车小游戏+源代码
- Unity3D Tetris 俄罗斯方块
- Unity3D贪吃蛇源码
- Unity3D 使用Vuforia Vuforia Engine 8.0发布
- unity 3d迷宫 NPC 小地图
- Final IK 2.0
- unity简单的2D飞机大战游戏
- NGUI v3.12.0 Unity3D2017~2018
- Unity3D VText 2.0.2
- 传智播客Unity3D视频教程—3-案例:地
- 《Unity3D ShaderLab开发实战详解》源代码
- Unity3D特效包 100种unity特效
- unity3d小游戏源码
- 次表面散射玉石
- 3D MAX 9(2009) FBX插件 官方版
- unity3d解包工具
评论
共有 条评论