def __onModelLoaded(self, resources): if self.__entity is None or not self.__loading: return else: self.__loading = False model = resources[TankPartNames.CHASSIS] self.__model = model self.__model.matrix = self.__entity.filter.groundPlacingMatrix self.__fashion = BigWorld.WGVehicleFashion(True) matHandlers = self.__baseTrackFashion.getMaterialHandlers() for handler in matHandlers: self.__fashion.addMaterialHandler(handler) model_assembler.setupTracksFashion(self.__fashion, self.__vehicleDesc, True) self.__model.setupFashions([self.__fashion]) rotationMProv = mathUtils.MatrixProviders.product( self.__entity.model.node('hull'), Math.MatrixInverse(self.__model.node('Tank'))) self.__model.node('V', rotationMProv) self.__fashion.setCrashEffectCoeff(0.0) self.__setupTracksHiding() self.__entity.addModel(self.__model) self.__applyVisibilityMask() return
def checkEntity(entity): matrixAdapter.invBounds = Math.MatrixInverse(MathUtils.getMatrixProduct(scaleMatrix, self._getVehicleBounds(entity))) return matrixAdapter.collisionSegment(scanStart, scanStop)