包含5節(jié)視頻教程
本系列包含Unity3D介紹、Unity3D導(dǎo)出人物、Unity3D導(dǎo)出場(chǎng)景、Unity3D導(dǎo)出動(dòng)作、游戲測(cè)試最終完成一個(gè)簡(jiǎn)單的游戲。是一套非常完整的Unity3D游戲制作教程。
![]()
|
![]() Fixed Joints restricts an object's movement to be dependent upon another object. This is somewhat similar to Parenting but is implemented through physics rather than Transform hierarchy. The best scenarios for using them are when you have objects that you want to easily break apart from each other, or connect two object's movement without parenting. 固定關(guān)節(jié)基于另一個(gè)物體來(lái)限制一個(gè)物體的運(yùn)動(dòng)。效果類似于父子關(guān)系,但是不是通過(guò)層級(jí)變換,而是通過(guò)物理實(shí)現(xiàn)的。使用它的最佳情境是當(dāng)你有一些想要輕易分開的物體,或想讓兩個(gè)沒(méi)有父子關(guān)系的物體一起運(yùn)動(dòng)。
Properties 屬性
Details 細(xì)節(jié)There may be scenarios in your game where you want objects to stick together permanently or temporarily. Fixed Joints may be a good Component to use for these scenarios, since you will not have to script a change in your object's hierarchy to achieve the desired effect. The trade-off is that you must use Rigidbodies for any objects that use a Fixed Joint. 在游戲中肯定存在這樣的情境,你想要物體永久或暫時(shí)的粘在一起。固定關(guān)節(jié)就是一個(gè)適用于這類情況的組件,它不需要用腳本來(lái)改變你的物體的層級(jí)來(lái)實(shí)現(xiàn)目標(biāo)效果。但僅適用含有剛體的物體。 For example, if you want to use a "sticky grenade", you can write a script that will detect collision with another Rigidbody (like an enemy), and then create a Fixed Joint that will attach itself to that Rigidbody. Then as the enemy moves around, the joint will keep the grenade stuck to them. 例如,你想搞個(gè)粘性炸彈,你就可以寫個(gè)腳本來(lái)檢測(cè)物體與其他剛體(比如敵人)的碰撞,然后創(chuàng)建一個(gè)固定關(guān)節(jié)將自身與該剛體相連。那么當(dāng)敵人移動(dòng)時(shí),關(guān)節(jié)就會(huì)使導(dǎo)彈一直粘在他身上。 Breaking joints 斷開關(guān)節(jié)You can use the Break Force and Break Torque properties to set limits for the joint's strength. If these are less than infinity, and a force/torque greater than these limits are applied to the object, its Fixed Joint will be destroyed and will no longer be confined by its restraints. 你可以使用破壞力與破壞扭力屬性來(lái)設(shè)置關(guān)節(jié)強(qiáng)度的極限。如果這些參數(shù)小于無(wú)窮大,而施加到物體上的力或力矩大于這個(gè)限制,那么固定關(guān)節(jié)將被銷毀,它對(duì)物體的約束也就不存在了。 Hints 提示
贊0 踩0 |
未知用戶
2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2025 ZhuFeng Community All Rights Reserved
VIP