unity cube
- 作者: LandRover3
- 来源: 51数据库
- 2020-09-23
整齐排列,编名,到目标地显示模型)1.如果你的方块是存在的多个cube,模型上用射线,射线碰到的方块改变下(如颜色变暗等) 2,去掉meshrender属性(不渲染).画多个cube,那么将模型跟随鼠标:没到目标地显示方块.用二维数组来判断范围是麻烦的事(主要是求整),简单的做法是电脑获得模型的原始坐标(比如模型的中心点),鼠标即时坐标的x值(和y值)减去原始坐标后的绝对值等于方块的边长时以即时坐标为中心显示方块(或干点别的,比如,相当于画网格,比较好理解3
transform.rotate(vector3.forward * 10 *time.deltatime , space.world);
transform.rotate (new vector3 (0, 0, 1) * 10*time.deltatime);
transform.rotate(0, 0, 10*time.deltatime,space.world);
这三个都行楼上的那个也行,就看你怎么用了
transform.rotate(vector3.forward * 10 *time.deltatime , space.world);
transform.rotate (new vector3 (0, 0, 1) * 10*time.deltatime);
transform.rotate(0, 0, 10*time.deltatime,space.world);
这三个都行楼上的那个也行,就看你怎么用了
推荐阅读
