So simple question I have a super long entity path. I need an arrow showing which why my model is traveling. I tried changing to arrow material for path , but line is too long don’t see the arrow at the end.
Have tried creating a vector call back where I get my entities position at now and a couple of seconds in the future but the arrow moves off the line. is there an entity.path.position.getValue(time)??
The Sandcastle linked in the response is using the entity’s position to compute the velocity vector over time. Once you get the velocity vector, you could normalize it to get the direction and input that into your arrow polyline. The input will be of unit length, so you can adjust the length as you wish.
@dzung I will try that but specifically is there a way to possibly show arrows along an entity.path? the need is that the path line is so long we don’t know which direction we are going?
@dzung you were correct about using the velocity vector now we realize there is a problem with your entity.path property (see attached picture). The velocity line is correct because the teal line/circles are plotting the path as we go using point graphics. The white line is the entity.path property. We have ingested position values using the same method as → Cesium Sandcastle
I guess the problem now is we want the entity.path line to be the same as the plotted path from all the points we ingested.
Just Figured out why we are seeing this @dzung Your entity.path property is always in the reference frame FIXED while we ingested our data in INERTIAL reference frame. That means you need to support an entity path that is in INERTIAL reference frame.
I try to change the property material in the code below.
I try to use Cesium.PolylineArrowMaterialProperty(color) but I can’t do it.
My goal is to create an arrow instead of a line.
The cesium version is 1.78.0.
Can anyone help me
?
This is my code:
------------viewer.entities.add({
availability: new Cesium.TimeIntervalCollection([
new Cesium.TimeInterval({ start: start, stop: stop }),
]),
position: positionProperties[i],
model: {
uri: airplaneUri,
minimumPixelSize: 250,
maximumScale: 10,
},
// Automatically compute the orientation from the position.
orientation: new Cesium.VelocityOrientationProperty(
positionProperties[i]
),
path: new Cesium.PathGraphics({
width: 3,
material: Cesium.Color.YELLOW,
leadTime: 20,
trailTime: 0,
}),
})