Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!