1. 修正了相机在变焦时不能保持在目标中心的问题
2. 增加检查,以确保碰撞器被触发时enabled也开启
This commit is contained in:
@@ -29,7 +29,7 @@ class ProjectileMover extends Component {
|
||||
let neighbors = Physics.boxcastBroadphase(this._collider.bounds, this._collider.collidesWithLayers);
|
||||
for (let i = 0; i < neighbors.colliders.length; i ++){
|
||||
let neighbor = neighbors.colliders[i];
|
||||
if (this._collider.overlaps(neighbor)){
|
||||
if (this._collider.overlaps(neighbor) && neighbor.enabled){
|
||||
didCollide = true;
|
||||
this.notifyTriggerListeners(this._collider, neighbor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user