part of 3d tech for the web course
movement
sums and movement
simulation
this.mesh.position.set(20, -50, 30);
this.mesh.position.x = 20; this.mesh.position.y = -50; this.mesh.position.z = 30;
fall_speed = -1;
this.mesh.position.y = this.mesh.position.y - fall_speeed;
var movement = new THREE.Vector3();
movement.x = 1; movement.y = 0; movement.z = 1;
this.mesh.position = this.mesh.position. + movement;
fall_speed = 0; gravity_acc = -0.04;
fall_speed = fall_speed + gravity_acc; this.mesh.position.y = this.mesh.position.y - fall_speeed;
var movement = new THREE.Vector3(0, 0, 0); var acceleration = new THREE.Vector3(0.05, 0, 0.05);
movement = movement + acceleration;
this.mesh.position = this.mesh.position. + movement;