Hi There,
We’re having an issue where objects are appearing blue the further away they are from camera. This is only happening at a device level (on multiple devices) and not present in studio or in demo mode.
The scenes don’t have any fog activated and camera clip is at default.
Is there a setting that could be affecting it?
Thanks
You probably cloned the project back when the fog was hardcoded into the WorldMap component. Can you share your World Map component here?
Sure:
import * as ecs from ‘@8thwall/ecs’
const {THREE} = window as any
ecs.registerComponent({
name: ‘World Map’,
schema: {
*// @label WASD Movement*
wasdMovement: ecs.boolean,
},
schemaDefaults: {
wasdMovement: false,
},
data: {
},
stateMachine: ({world, eid, schemaAttribute, dataAttribute}) => {
ecs.defineState('default')
.initial()
.onEnter(() => {
world.three.scene.fog = new THREE.FogExp2(0x8DEDF6, 0.09)
const wasdEnabled = schemaAttribute.get(eid).wasdMovement
*// @ts-ignore*
const gpsEnabled = ecs.Map.get(world, eid).useGps
if (wasdEnabled && gpsEnabled) {
console.warn('The map is currently using both GPS and WASD controls. Only one option is supported at a time.')
}
})
.onTick(() => {
const wasdEnabled = schemaAttribute.get(eid).wasdMovement
if (wasdEnabled) {
const forward = world.input.getKey('KeyW')
const backward = world.input.getKey('KeyS')
const left = world.input.getKey('KeyA')
const right = world.input.getKey('KeyD')
let latDirection = 0
let lonDirection = 0
if (forward) latDirection = -1
if (backward) latDirection = 1
if (left) lonDirection = -1
if (right) lonDirection = 1
if (latDirection !== 0 || lonDirection !== 0) {
*// @ts-ignore*
ecs.Map.mutate(world, eid, (cursor) => {
cursor.latitude += latDirection \* (1 / 111111) \* world.time.delta \* 0.1
cursor.longitude -= lonDirection \* (1 / 111111) \* world.time.delta \* 0.1
})
dataAttribute.set(eid, {
*// @ts-ignore*
latitude: ecs.Map.get(world, eid).latitude,
*// @ts-ignore*
longitude: ecs.Map.get(world, eid).longitude,
})
}
}
})
},
})
Remove this line from the script:

Great. Thanks. Will give that a try on site.