I'm pretty new to three.js.i want to make a cube/object moving in a plain surface/road.i move the object z direction.but i want to move camera too .(like a driver and car).
function move() {
// move cube and camera
cube.position.z -= 0.06;
camera.position.z -= 0.06;
}
As in following picture it start correctly but suddenly rotate and change the direction.basically i expect cube move with camera behind it.so it should look like a car moving with driver in a road.but you can see world is rotating around x axis.i don't want it to rotate like this.i want to know why this is happening.
