没有合适的资源?快使用搜索试试~ 我知道了~
Unity3D如何画直线、点与插件Vectrosity简介1
需积分: 0 13 下载量 33 浏览量
2022-08-08
21:24:09
上传
评论
收藏 14KB DOCX 举报
温馨提示
试读
5页
Unity3D如何画直线、点与插件Vectrosity简介1
资源推荐
资源详情
资源评论
Unity3D 如何画直线、点与插件 Vectrosity 简介
Posted on 2013 年 02 月 28 日 by U3d / Unity3D 基础教程/被围观 332 次
Unity3D 如何画直线和点。
画线
// Make Vector2 array; in this case we just use 2 elements...
var linePoints = [Vector2(0, Random.Range(0, Screen.height)), // ...one on the left
side of the screen somewhere
Vector2(Screen.width-1, Random.Range(0, Screen.height))]; // ...and one on the
right
// Make a VectorLine object using the above points and the default material, with
a width of 2 pixels
var line = new VectorLine("Line", linePoints, null, 2.0);
// Draw the line
Vector.DrawLine(line);
画线需要 LinePoints,注意:Vector2 是 Screen 以像素为单位的点,如果用
Vector3 的话那么就是 world Space 里面的点画线。
资源评论
英次
- 粉丝: 20
- 资源: 306
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功