朱峰社區(qū)首頁 朱峰社區(qū)

搜索資源 注冊(cè)|登陸

等待

返回 展開菜單
按功能 按軟件

Unity3D游戲制作教程

Unity3D游戲制作教程

包含5節(jié)視頻教程

本系列包含Unity3D介紹、Unity3D導(dǎo)出人物、Unity3D導(dǎo)出場(chǎng)景、Unity3D導(dǎo)出動(dòng)作、游戲測(cè)試最終完成一個(gè)簡(jiǎn)單的游戲。是一套非常完整的Unity3D游戲制作教程。

關(guān)閉

Unity組件:Constant Force 恒力

關(guān)注:4108 留言:0 樓主:上;鹬 發(fā)帖時(shí)間:15年11月16日

上海火之炎

普通會(huì)員

上;鹬

社區(qū)新人:1級(jí)

關(guān)注2010人

  • 積分

    1

  • 登陸

    1

  • 發(fā)帖

    2

  • 留言

    1

間隔線

Constant Force is a quick utility for adding constant forces to a Rigidbody. This works great for one shot objects like rockets, if you don't want it to start with a large velocity but instead accelerate.

恒力是一種快速有效地給剛體添加恒定外力的方法。適用于類似于火箭等射出的對(duì)象,如果你不希望其初速度很大而是不斷加速。

A rocket propelled forward by a Constant Force 一枚被恒力推動(dòng)前進(jìn)的火箭
A rocket propelled forward by a Constant Force 一枚被恒力推動(dòng)前進(jìn)的火箭

Properties 屬性
  • Force
    The vector of a force to be applied in world space.
    被施加的力在世界坐標(biāo)中的矢量
  • Relative Force 相對(duì)力
    The vector of a force to be applied in the object's local space.
    被施加在對(duì)象上的力在本地坐標(biāo)中的矢量
  • Torque 扭矩
    The vector of a torque, applied in world space. The object will begin spinning?around?this vector. The longer the vector is, the faster the rotation.
    施加在世界坐標(biāo)中的扭矩矢量。對(duì)象將繞著該矢量轉(zhuǎn)動(dòng)。矢量越長(zhǎng),轉(zhuǎn)速越快。
  • Relative Torque 相對(duì)扭矩
    The vector of a torque, applied in local space. The object will begin spinning?around?this vector. The longer the vector is, the faster the rotation.
    施加在本地坐標(biāo)中的扭矩矢量。對(duì)象將繞著該矢量轉(zhuǎn)動(dòng)。矢量越長(zhǎng),轉(zhuǎn)速越快。
Details 細(xì)節(jié)

To make a rocket that accelerates forward set the Relative Force to be along the positive z-axis. Then use the Rigidbody's Drag property to make it not exceed some maximum velocity (the higher the drag the lower the maximum velocity will be). In the Rigidbody, also make sure to turn off gravity so that the rocket will always stay on its path.

沿著z軸正方向設(shè)定相對(duì)推力會(huì)使火箭向前加速。使用剛體的Drag屬性使其不會(huì)超過某個(gè)最大速度(drag越大,最大速度會(huì)越。。剛體中的萬有引力也要保證關(guān)掉,這樣火箭將會(huì)一直保持其路徑。

Hints 提示
  • To make an object flow upwards, add a Constant Force with the Force property having a positive Y value.
    施加包含沿Y軸正方向Force屬性的恒力,可以使對(duì)象朝上飛。
  • To make an object fly forwards, add a Constant Force with the Relative Force property having a positive Z value.
    施加包含沿Z軸正方向Relative Force屬性的恒力,可以使對(duì)象向前飛

贊0 踩0

未知用戶

2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2025 ZhuFeng Community All Rights Reserved

VIP

朱峰社區(qū)微信公眾號(hào)

回頂部

1.復(fù)制文本發(fā)給您的QQ好友或群、微信等;好友點(diǎn)擊鏈接以后,轉(zhuǎn)發(fā)就成功了。 2.如朋友點(diǎn)擊您的鏈接,您需要需刷新一下才行;同一個(gè)好友僅能點(diǎn)擊一次。
購買VIP,觀看所有收費(fèi)教程!