感谢NEZ库提供的思路

This commit is contained in:
yhh
2021-06-11 16:20:01 +08:00
parent 44e2ca07e5
commit 219b90fc5d
10 changed files with 204 additions and 21 deletions

View File

@@ -16,6 +16,7 @@ module es {
* 在碰撞器中开始的射线/直线是否强制转换检测到那些碰撞器
*/
public static raycastsStartInColliders = false;
public static debugRender: boolean = false;
/**
* 我们保留它以避免在每次raycast发生时分配它
*/
@@ -43,7 +44,8 @@ module es {
}
public static debugDraw(secondsToDisplay) {
this._spatialHash.debugDraw(secondsToDisplay);
if (this.debugRender)
this._spatialHash.debugDraw(secondsToDisplay);
}
/**