Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

249
Vistas
Cesium : Set height offset on SampledProperty with ClampToGround

I'm using a sandcastle example to animate an entity by using SampledProperty and clampToGround methods. I want to add height distance between entity and the path on which it is moving.

I have tried the solution given on this link But not getting any change on entity position. Here is the sandcastle link

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Solved it by modify code as below:

function start() {
  clock.shouldAnimate = true;
  var objectsToExclude = [entity];
  scene.postRender.addEventListener(function () {
    var position = positionProperty.getValue(clock.currentTime);
    var clampPos = scene.clampToHeight(position, objectsToExclude);
    clampPos = Cesium.Matrix4.multiplyByPoint(Cesium.Transforms.eastNorthUpToFixedFrame(clampPos),new Cesium.Cartesian3(0, 0, 2), new Cesium.Cartesian3());
    entity.position = clampPos;
  });
}

Sandcastle link

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda