galacean / engine

A typescript interactive engine, support 2D, 3D, animation, physics, built on WebGL and glTF.
https://galacean.antgroup.com/engine
MIT License
4.2k stars 299 forks source link

使用 isSleeping 优化 DynamicCollider 的位置回调 #2142

Open cptbtptpbcptdtptp opened 3 months ago

cptbtptpbcptdtptp commented 3 months ago

image DynamicCollider 每帧的 lateUpdate 都必定会回调更新 entity 的 transform ,通过结合 isSleeping 可以减少很多不必要的更新。

cptbtptpbcptdtptp commented 3 months ago

image