body.isBullet

Description:

A boolean for whether the body should be treated as a “bullet”. Bullets are subject to continuous collision detection, rather than periodic collision detection at world timesteps. This is more computationally expensive, but it prevents fast-moving objects from passing through solid barriers. The default is false.

一個布爾該機構是否被視為一個“子彈頭”子彈都受到連續碰撞檢測,碰撞檢測,而不是定期在世界時間步這是更昂貴的計算它可以防止快速移動的物體從穿過堅實屏障。默認為 false。
在body碰撞判斷時,如果速度很的碰撞,會有無法判斷碰撞的現象發生,如果把body.isBullet設定為true,那就可以很精密的判斷碰判,這可能會降低效能,因為cpu一直在計算。

 

 

arrow
arrow
    全站熱搜

    createps 發表在 痞客邦 留言(0) 人氣()