@galacean/engine-core 1.1.0-beta.47 → 1.1.0-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +7 -3
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +7 -3
- package/dist/module.js +7 -3
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/physics/HitResult.d.ts +3 -0
package/dist/main.js
CHANGED
|
@@ -14487,7 +14487,9 @@ var Collision = function Collision() {
|
|
|
14487
14487
|
};
|
|
14488
14488
|
if (hitResult != undefined) {
|
|
14489
14489
|
var result = this._nativePhysicsScene.raycast(ray, distance, onRaycast, function(idx, distance, position, normal) {
|
|
14490
|
-
|
|
14490
|
+
var hitShape = _this._scene.engine._physicalObjectsMap[idx];
|
|
14491
|
+
hitResult.entity = hitShape._collider.entity;
|
|
14492
|
+
hitResult.shape = hitShape;
|
|
14491
14493
|
hitResult.distance = distance;
|
|
14492
14494
|
hitResult.normal.copyFrom(normal);
|
|
14493
14495
|
hitResult.point.copyFrom(position);
|
|
@@ -14496,6 +14498,7 @@ var Collision = function Collision() {
|
|
|
14496
14498
|
return true;
|
|
14497
14499
|
} else {
|
|
14498
14500
|
hitResult.entity = null;
|
|
14501
|
+
hitResult.shape = null;
|
|
14499
14502
|
hitResult.distance = 0;
|
|
14500
14503
|
hitResult.point.set(0, 0, 0);
|
|
14501
14504
|
hitResult.normal.set(0, 0, 0);
|
|
@@ -15157,6 +15160,7 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
15157
15160
|
/** The distance from the ray's origin to the impact point. */ this.distance = 0;
|
|
15158
15161
|
/** The impact point in world space where the ray hit the collider. */ this.point = new engineMath.Vector3();
|
|
15159
15162
|
/** The normal of the surface the ray hit. */ this.normal = new engineMath.Vector3();
|
|
15163
|
+
/** The shape of the collider that was hit. */ this.shape = null;
|
|
15160
15164
|
};
|
|
15161
15165
|
|
|
15162
15166
|
/**
|
|
@@ -22031,7 +22035,7 @@ var passNum = 0;
|
|
|
22031
22035
|
}
|
|
22032
22036
|
// make suer from the same renderer.
|
|
22033
22037
|
if (componentA.instanceId === componentB.instanceId) {
|
|
22034
|
-
return dataA.material._priority - dataB.material._priority
|
|
22038
|
+
return dataA.material._priority - dataB.material._priority;
|
|
22035
22039
|
} else {
|
|
22036
22040
|
var distanceDiff = componentA._distanceForSort - componentB._distanceForSort;
|
|
22037
22041
|
if (distanceDiff === 0) {
|
|
@@ -22054,7 +22058,7 @@ var passNum = 0;
|
|
|
22054
22058
|
}
|
|
22055
22059
|
// make suer from the same renderer.
|
|
22056
22060
|
if (componentA.instanceId === componentB.instanceId) {
|
|
22057
|
-
return dataA.material._priority - dataB.material._priority
|
|
22061
|
+
return dataA.material._priority - dataB.material._priority;
|
|
22058
22062
|
} else {
|
|
22059
22063
|
var distanceDiff = componentB._distanceForSort - componentA._distanceForSort;
|
|
22060
22064
|
if (distanceDiff === 0) {
|