From 6cf6121453177c969c7485394a250d7580c6e09a Mon Sep 17 00:00:00 2001 From: lealzhan Date: Wed, 19 Jul 2023 18:38:59 +0800 Subject: [PATCH] [fix] physics3d native cct api error --- platforms/native/engine/jsb-physics.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platforms/native/engine/jsb-physics.js b/platforms/native/engine/jsb-physics.js index 31310609783..7f137116dfa 100644 --- a/platforms/native/engine/jsb-physics.js +++ b/platforms/native/engine/jsb-physics.js @@ -44,8 +44,8 @@ const CollisionEventObject = { const CCTShapeEventObject = { type: 'onControllerColliderHit', - selfController: null, - otherCollider: null, + controller: null, + collider: null, worldPosition: null, worldNormal: null, motionDirection: null, @@ -146,8 +146,8 @@ function emitCCTShapeEvent (t, cct, collider, b) { CCTShapeEventObject.worldNormal = new cc.Vec3(b[3], b[4], b[5]); CCTShapeEventObject.motionDirection = new cc.Vec3(b[6], b[7], b[8]); CCTShapeEventObject.motionLength = b[9]; - CCTShapeEventObject.selfController = cct; - CCTShapeEventObject.otherCollider = collider; + CCTShapeEventObject.controller = cct; + CCTShapeEventObject.collider = collider; cct.emit(t, CCTShapeEventObject); } @@ -914,7 +914,7 @@ class CharacterController { this.setCenter(this._com.center); this.setStepOffset(this._com.stepOffset); this.setSlopeLimit(this._com.slopeLimit); - this.setContactOffset(this._com.contactOffset); + this.setContactOffset(this._com.skinWidth); this.setDetectCollisions(true);//this._com.detectCollisions); this.setOverlapRecovery(true);//this._com.enableOverlapRecovery); }