是否可以在 AR GeoObject 中为 3D 模型 AR.GeoLocation 使用遮挡?
我们正在开发一款应用程序,当您进入预定义的地理围栏区域时,该应用程序会在建筑物的特定高度显示广告横幅。
现在,在当前阶段,我们可以使用 wikiitude 将 AR 对象模型放置到建筑物上。但问题是,能够看到墙外的模型和目标建筑物之间的建筑物。我们希望避免这种情况,仅在目标建筑物和摄像头之间没有障碍物时才显示广告。
我的困惑是我们希望遮挡物的行为是动态的。因此,无论是建筑物、树、手还是其他任何东西,都应该应用效果,并且不会为被阻挡的部分显示模型。
此外,我还附上了几个 URL 供您参考,以展示我们正在寻找的内容
var World = {
loaded: false,
rotating: false,
init: function initFn() {
this.createModelAtLocation();
},
createModelAtLocation: function createModelAtLocationFn() {
/*
First a location where the model should be displayed will be defined. This location will be relativ to the user.
*/
//var location = new AR.RelativeLocation(null, 5, 0, 2);
var geoLoc = new AR.GeoLocation(23.027390, 72.558721, 320.);//National Handloom
//var geoLoc = new AR.GeoLocation(23.028350, 72.506674, 320.);//Iscon
//var geoLoc = new AR.GeoLocation(26.206274, 73.048096, 320.);//Jodhpur
//var geoLoc = new AR.GeoLocation(40.319421, -74.631490, 320.);//client
var location = new AR.RelativeLocation(geoLoc, 10, 10, 10);
/*
Next the model object is loaded.
*/
var modelEarth = new AR.Model("assets/earth.wt3", {
onLoaded: this.worldLoaded,
scale: {
x: 10,
y: 10,
z: 10
}
});
var indicatorImage = new AR.ImageResource("assets/indi.png");
var indicatorDrawable = new AR.ImageDrawable(indicatorImage, 0.1, {
verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP
});
/*
Putting it all together the location and 3D model is added to an AR.GeoObject.
*/
var obj = new AR.GeoObject(location, {
drawables: {
cam: [modelEarth],
indicator: [indicatorDrawable]
}
});
},
worldLoaded: function worldLoadedFn() {
World.loaded = true;
var e = document.getElementById('loadingMessage');
e.parentElement.removeChild(e);
}
};
World.init();
请告诉我
谢谢乌梅什。