![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
unity
文章平均质量分 86
jacksonshe
这个作者很懒,什么都没留下…
展开
-
基于之前的公路网格弯道点的算法改变
我上一篇博客用了简单方法根据点乘的值来计算出圆心的位置,然后在p1到p2之间计算步长,用圆心到p1累加步长的点来计算半径的朝向,但是该方法会产生不平滑的弯道,所以我想在圆心到p1点乘圆心到p2的向量得到cos值,用反余弦值计算弧度,把弧度除以2,得到夹角的一半。然后以半径R的朝向为x轴,用全局上方向向量叉乘,构建新的直角坐标系,因为我不考虑y分量的位置,所以我把其抽象为二维空间上图可以看到...原创 2018-03-22 16:25:13 · 421 阅读 · 0 评论 -
制作unity公路网格
这是我第一次写技术类的网格,因为之前学习过图形学和用DX9框架制作过渲染引擎,所以再来学习unity就简单许多了。在DX或者OPENGL中我们用得最多的是矩阵,把一个坐标系转化到另外一个坐标系,但是在unity中引擎已经自动帮你添加这些特性,可以说用unity做游戏是可以减轻我们很多工作量的,但是在最近开发赛车游戏的时候,发现想添加一个迂回曲直的公路,在网上找模型,发现都不适合自己,所以就...原创 2018-03-21 17:20:21 · 3642 阅读 · 2 评论 -
Create the track manager script and customize the inspector by the class derived by editor(1)
Create the track manager script and customize the inspector by the class derived by editor which using the unityEditor namespace .consider some problems in the track managerfirst we need the race line...翻译 2018-04-18 00:02:56 · 127 阅读 · 0 评论 -
unity Car Script
using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraFollow : MonoBehaviour { public Transform carTransform; public Vector3 targetPosition; ...原创 2019-04-04 13:11:05 · 522 阅读 · 0 评论