@@ -412,6 +412,10 @@ export class car extends Component {
}
+ if(x<left||x>right){
+ x = this.node.position.x
+ }
+
let rect = new Rect(x-size.width*0.5,y-size.height*0.5,size.width,size.height)
// let rect = this.node.getComponent(UITransform).getBoundingBox()
let list = this.game_manager.carCollider(rect)