Hello,
Is it possible somehow get all intersections between ray & loaded GLTF model? Or is it possible somehow run Scene.pickPosition(windowPosition, result) but instead windowPosition provide ray?
Hello,
Is it possible somehow get all intersections between ray & loaded GLTF model? Or is it possible somehow run Scene.pickPosition(windowPosition, result) but instead windowPosition provide ray?
You can use the position returned by Scene.pickPosition to create a ray. Just use the camera’s world position, Camera.positionWC, to figure out the direction and origin.
var origin = scene.camera.positionWC;
var direction = Cesium.Cartesian3.subtract(position, origin, new Cesium.Cartesian3());
var ray = new Cesium.Ray(origin, direction);
``