Closed jianbocui closed 2 years ago
You're mixing concepts, first, the object is not changing when it moves neither if it intercepts any other object models. So the event handler you're adding is not being fired. Second, the fill-extrusions created by Mapbox are not "visible" for Three.js raycaster, so you won't be able to detect that collisions because both objects are different 3D elements created by 2 different 3D frameworks. If what you want is to detect collisions between different objects, I recommend you to first check how detect collisions should be done in three.js without mapbox and threebox, and then implement it in your scenario.
Threebox version: Version 2.2.6
Question
Hi There,
In the game example, I want to detect if the car intercepts with a loaded model either in the same layer as the truck or on a different layer using
truck.addEventListener('ObjectChanged', onObjectChanged, false);
, here is my example code , but theonObjectChanged
doesn't detect anything when it intercept with the object