Entity: Assign an offset to path of a model

15 views
Skip to first unread message

tkazik

unread,
Mar 30, 2020, 6:26:29 PM3/30/20
to cesium-dev
1. A concise explanation of the problem you're experiencing.
I have a model that has its reference frame not exactly in the center of the model.
I would also like to display the path of the model, which ideally should be in the center of the model. Thus, I would like to apply an offset transform to the path or model. 


2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
        var entity = viewer.entities.add({
         position: W_t_W_M__sample,
                orientation: q_W_M__sample,
                model: {
                    uri: resource,
                    shadowsCesium.ShadowMode.ENABLED, 
                },
                availabilitynew Cesium.TimeIntervalCollection([new Cesium.TimeInterval({
                    start: start,
                    stop: stop
                })]),

                path: {
                    resolution1,
                    materialnew Cesium.PolylineGlowMaterialProperty({
                        glowPower0.1,
                        colorCesium.Color.YELLOW
                    }),
                    width10,
// possibility to add some sort of offset?
                }


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
There are two option:
1. Having some sort of offset in an entity would be nice
2. Adding another entity with a new sample position just for the path

For the second option: How could I have two entities running both at the same time?

4. The Cesium version you're using, your operating system and browser.
All the latest and newest at the time of writing :) Thank you very much!


Reply all
Reply to author
Forward
0 new messages