diff --git a/cocos/core/renderer/scene/render-scene.ts b/cocos/core/renderer/scene/render-scene.ts index 9b41b9d485..ac3f39f5a4 100644 --- a/cocos/core/renderer/scene/render-scene.ts +++ b/cocos/core/renderer/scene/render-scene.ts @@ -106,7 +106,7 @@ export class RenderScene { * 获取 raycastSingleModel 后的检测结果 */ get rayResultSingleModel () { - return this.rayResultSingleModel; + return resultSingleModel; } public static registerCreateFunc (root: Root) { diff --git a/cocos/core/splash-image.ts b/cocos/core/splash-image.ts index 870f8c3438..a2313cdfeb 100644 --- a/cocos/core/splash-image.ts +++ b/cocos/core/splash-image.ts @@ -166,27 +166,13 @@ export class SplashScreen { this.effect.shaders = this.program.shaders; this.effect.onLoaded(); - this.callBack = null; this.cancelAnimate = false; this.startTime = -1; this.clearColors = [this.setting.clearColor]; this.device = device; - - /** IOS adapt, use native size */ this.screenWidth = this.device.width; this.screenHeight = this.device.height; - if (this.device.nativeWidth < this.device.nativeHeight) { - if (this.device.width > this.device.height) { - this.screenWidth = this.device.height; - this.screenHeight = this.device.width; - } - } else { - if (this.device.width < this.device.height) { - this.screenWidth = this.device.height; - this.screenHeight = this.device.width; - } - } this.image = new Image(); this.image.onload = this.init.bind(this); diff --git a/cocos/physics/components/physics-system.ts b/cocos/physics/components/physics-system.ts index 6b0988da4c..83d59a623b 100644 --- a/cocos/physics/components/physics-system.ts +++ b/cocos/physics/components/physics-system.ts @@ -149,7 +149,7 @@ export class PhysicsSystem extends System { 'group': -1, 'mask': -1, 'queryTrigger': true, - 'maxDistance': Infinity + 'maxDistance': 10000000 } private readonly raycastResultPool = new RecyclePool(() => { @@ -198,12 +198,12 @@ export class PhysicsSystem extends System { * 检测所有的碰撞盒,并记录所有被检测到的结果,通过 PhysicsSystem.instance.raycastResults 访问结果 * @param worldRay 世界空间下的一条射线 * @param mask 掩码 - * @param maxDistance 最大检测距离 + * @param maxDistance 最大检测距离,目前请勿传入 Infinity 或 Number.MAX_VALUE * @param queryTrigger 是否检测触发器 * @return boolean 表示是否有检测到碰撞盒 * @note 由于目前 Layer 还未完善,mask 暂时失效,请留意更新公告 */ - public raycast (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = Infinity, queryTrigger = true): boolean { + public raycast (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = 10000000, queryTrigger = true): boolean { this.raycastResultPool.reset(); this.raycastResults.length = 0; this.raycastOptions.mask = mask; @@ -217,12 +217,12 @@ export class PhysicsSystem extends System { * 检测所有的碰撞盒,并记录与射线距离最短的检测结果,通过 PhysicsSystem.instance.raycastClosestResult 访问结果 * @param worldRay 世界空间下的一条射线 * @param mask 掩码 - * @param maxDistance 最大检测距离 + * @param maxDistance 最大检测距离,目前请勿传入 Infinity 或 Number.MAX_VALUE * @param queryTrigger 是否检测触发器 * @return boolean 表示是否有检测到碰撞盒 * @note 由于目前 Layer 还未完善,mask 暂时失效,请留意更新公告 */ - public raycastClosest (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = Infinity, queryTrigger = true): boolean { + public raycastClosest (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = 10000000, queryTrigger = true): boolean { this.raycastOptions.mask = mask; this.raycastOptions.maxDistance = maxDistance; this.raycastOptions.queryTrigger = queryTrigger;