模型根据摄像机旋转
2011-06-20 13:35
232 查看
var cam : Transform;
var cameraRelativeRight : Vector3;
// Apply a force relative to the camera's x-axis
function Update()
{
cameraRelativeRight = cam.TransformDirection (Vector3.right);
cameraRelativeRight.y = 0;
transform.rotation = Quaternion.RotateTowards (transform.rotation, Quaternion.LookRotation(cameraRelativeRight), 5);
}
var cameraRelativeRight : Vector3;
// Apply a force relative to the camera's x-axis
function Update()
{
cameraRelativeRight = cam.TransformDirection (Vector3.right);
cameraRelativeRight.y = 0;
transform.rotation = Quaternion.RotateTowards (transform.rotation, Quaternion.LookRotation(cameraRelativeRight), 5);
}
相关文章推荐
- Unity 点击模型上任意位置,模型旋转,点击位置朝向摄像机
- 1. 通过移动鼠标旋转摄像机观察模型
- 控制摄像机围绕目标旋转观察
- Unity3D研究院之控制模型移动旋转与碰撞(七)
- ArcGIS教程:根据经验半变异函数拟合模型
- 摄像机成像模型
- 在Unity中通过触摸屏幕实现模型的旋转和缩放
- Uniyt-UGUI上左右滑动鼠标控制模型旋转
- 摄像机线性模型
- TDD应用试例(根据领域驱动模型设计的培训内容)
- MATLAB模糊逻辑系统根据模糊系统模型绘图
- 基于java.util.logging实现轻量级日志记录库(增加根据当前类class初始化,修复线程池模型(javaEE)下的堆栈轨迹顺序与当前调用方法不一致问题)
- 关于IRRLICHT中动态操作摄像机位置和旋转的条件函数
- 照相机根据触摸围绕目标旋转
- unity 鼠标控制摄像机围绕物体旋转
- 摄像机的内外参模型
- 根据触摸点将精灵旋转一定角度
- Unity3D中通过陀螺仪来控制摄像机的旋转
- 滑动屏幕旋转模型功能实现
- 摄像机模型与标定—棋盘、亚像素角点和绘制棋盘角点