Skip to content

Commit e0c65c4

Browse files
committed
remove offsets when using global position
1 parent 6d71be3 commit e0c65c4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/controllers/Entity.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class Entity {
122122
const loader = new GLTFLoader();
123123
loader.load(
124124
`http://localhost:${PORT}/model`,
125-
function (gltf) {
125+
function(gltf) {
126126
instance.mesh = gltf.scene;
127127
instance.mesh.children[0].children[0].material.transparent = true;
128128
instance.mesh.children[0].children[0].material.opacity = instance.alpha;
@@ -137,7 +137,7 @@ export default class Entity {
137137
scene.add(instance.mesh);
138138
},
139139
undefined,
140-
function (error) {
140+
function(error) {
141141
console.log(error);
142142
console.log("failed to load drone, setting up default cube");
143143
const geometry = new THREE.BoxGeometry(2, 0.5, 0.3);
@@ -161,11 +161,8 @@ export default class Entity {
161161
this.ref_y = e.props[0].y;
162162
this.ref_z = e.props[0].z;
163163
} else {
164-
const [x, y] = getXY(e.props[0].longitude, e.props[0].lattitude);
165-
// const z = -e.props[0].altitude;
166-
this.ref_x = x;
167-
this.ref_y = y;
168-
// this.ref_z = z;
164+
this.ref_x = 0;
165+
this.ref_y = 0;
169166
this.ref_z = 0;
170167
}
171168
}

0 commit comments

Comments
 (0)