Hi!
I’m trying to make my box move, but if I use
if(event.which==879 {
this.position.z+=0.01;
}
it tells me following:
undefined is not an object (evaluating 'this.positon.z') update@
update@[native code]
dispatch@blob:https://threejs.org/09a1f96b-1617-4997-9a6f-434fbdd4f56e:144:15
animate@blob:https://threejs.org/09a1f96b-1617-4997-9a6f-434fbdd4f56e:158:13
onAnimationFrame@blob:https://threejs.org/070fea21-3a74-4527-94bf-62e4c20e4169:27391:59
onAnimationFrame@blob:https://threejs.org/070fea21-3a74-4527-94bf-62e4c20e4169:12494:16
I also tried
if(event.which==879 {
this.translateZ(0.01);
}
result:
Can’t find variable: cube
I would be grateful if someone could help me.