MonoBehaviour.FixedUpdate固定更新-創(chuàng)新互聯(lián)

function FixedUpdate () : voidMonoBehaviour.Fi
xedUpdate固定更新

Description描述

成都創(chuàng)新互聯(lián)長(zhǎng)期為上千余家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開(kāi)放共贏平臺(tái),與合作伙伴共同營(yíng)造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為吳川企業(yè)提供專(zhuān)業(yè)的成都網(wǎng)站建設(shè)、做網(wǎng)站,吳川網(wǎng)站改版等技術(shù)服務(wù)。擁有10余年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開(kāi)發(fā)。

This function is called every fixed framerate frame, if the MonoBehaviour is enabled.

當(dāng)MonoBehaviour啟用時(shí),其 FixedUpdate 在每一幀被調(diào)用。

FixedUpdate should be used instead of Update when dealing with Rigidbody . For example when adding a force to a rigidbody, you have to apply the force every fixed frame inside FixedUpdate instead of every frame inside Update.

處理Rigidbody時(shí),需要用FixedUpdate代替Update。例如:給剛體加一個(gè)作用力時(shí),你必須應(yīng)用作用力在FixedUpdate里的固定幀,而不是Update中的幀。(兩者幀長(zhǎng)不同)

// Apply a upwards force to the rigid body every frame
// 每幀應(yīng)用一個(gè)向上的力到剛體上function FixedUpdate () {
    rigidbody.AddForce ( Vector3.up );
}

In order to get the elapsed time since last call to FixedUpdate, use Time.deltaTime This function is only called if the Behaviour is enabled. Override this function in order to provide your component's functionality.

為了獲取自最后一次調(diào)用FixedUpdate所用的時(shí)間,可以用Time.deltaTime。這個(gè)函數(shù)只有在Behaviour啟用時(shí)被調(diào)用。實(shí)現(xiàn)組件功能時(shí)重載這個(gè)函數(shù)。

分享題目:MonoBehaviour.FixedUpdate固定更新-創(chuàng)新互聯(lián)
分享地址:http://bm7419.com/article26/ceopcg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供關(guān)鍵詞優(yōu)化、網(wǎng)站設(shè)計(jì)網(wǎng)站營(yíng)銷(xiāo)品牌網(wǎng)站制作、網(wǎng)站設(shè)計(jì)公司自適應(yīng)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)公司