Question of fresh beginner

can someone advise why below ArrowLeft key doesn’t move the avatar?
Thanks

var body = new THREE.SphereGeometry(100);
var cover = new THREE.MeshNormalMaterial(flat);
var avatar = new THREE.Mesh(body,cover);
scene.add(avatar);

document.addEventListener(‘keydown’,sendKeyDown);
function sendKeyDown(event) {
//alert(event.code);
var code = event.code;
if (code == ‘ArrowLeft’) avatar.position.x = avatar.position.x - 50;

You need to refresh the scene somehow. We don’t see your animate function so I can’t give you more explicit hints. You might look here.

Also for future reference it’d have been helpful if you mentioned more about what you were using - javascript and three.js.