1 / 11

飞机控制实例

飞机控制实例. 课程内容. 设置父子关系 设置螺旋桨旋转动画 设置地面动画 设置天空和环境 设置飞机控制 Op 用法 常见数据类型和运算符号 课程练习. 设置父子关系. 进入子物件管理 , 设置飞机父子关系 : 左螺旋桨为左螺旋桨轴子物件 , 左螺旋桨轴为机身子物件 ; 右螺旋桨为右螺旋桨轴子物件 , 右螺旋桨轴为机身子物件 ;. 设置螺旋桨旋转动画. 设置左 右螺旋桨轴的旋转脚本实现动画. 设置地面动画. 1 增加一平面作为地面 , 设置其贴图为草地. 2 给地面增加 ” 贴图滚动 ”BB1. 3 设置其目标为地面网格.

Download Presentation

飞机控制实例

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 飞机控制实例

  2. 课程内容 • 设置父子关系 • 设置螺旋桨旋转动画 • 设置地面动画 • 设置天空和环境 • 设置飞机控制 • Op用法 • 常见数据类型和运算符号 • 课程练习

  3. 设置父子关系 进入子物件管理,设置飞机父子关系: 左螺旋桨为左螺旋桨轴子物件,左螺旋桨轴为机身子物件; 右螺旋桨为右螺旋桨轴子物件,右螺旋桨轴为机身子物件;

  4. 设置螺旋桨旋转动画 设置左\右螺旋桨轴的旋转脚本实现动画

  5. 设置地面动画 1 增加一平面作为地面,设置其贴图为草地 2 给地面增加”贴图滚动”BB1 3设置其目标为地面网格 4其滚动方向为Y轴

  6. 设置天空和环境 1 在Level上按右键选setup 3 设置环境色 Fog为雾颜色 Background为背景颜色 2 设置其背景贴图,并可设置开始摄像机 4 设置雾的状况 (雾可以让远处模糊,近出清晰)

  7. 设置飞机控制 1添加飞机机身脚本 按键 获取三维坐标 获取X或Y坐标 检测是否超过范围 移动

  8. Op用法 需要计算的数据类型(最多两个数据) 运算符号 运算结果的数据类型 1 点op右键,可选择进入设置编辑 示范:获取三维坐标(x,y,z)中的x数据,需要计算的数据类型为Vector,运算符号Get x,运算结果的数据类型Float

  9. 常见数据类型和运算符号 • 3D Object 三维物件类型 • Float 浮点数字类型 • Integer 整数类型 • String 字符类型 • Vector 三维坐标 • Vector 2D 二维坐标 • Get Position 获取三维坐标 • Get X 获取x坐标 • Addition 加法 • Subtraction 减法 • Multiplication 乘法

  10. 飞机控制按键流程图 开始 等按W键 获取Y坐标 判断 X<=16 否 是 向Y轴移动0.2距离

  11. 课程练习 • 根据老师提供的素材完成此ppt中的飞机控制和场景设置,并保存为“plane02.cmo”

More Related