|
@@ -172,7 +172,7 @@
|
|
var cube = room.children[ 0 ];
|
|
var cube = room.children[ 0 ];
|
|
room.remove( cube );
|
|
room.remove( cube );
|
|
|
|
|
|
- cube.position.copy( controller.position );
|
|
|
|
|
|
+ cube.position.copy( controller.position ).sub( room.position );
|
|
cube.userData.velocity.x = ( Math.random() - 0.5 ) * 0.02 * delta;
|
|
cube.userData.velocity.x = ( Math.random() - 0.5 ) * 0.02 * delta;
|
|
cube.userData.velocity.y = ( Math.random() - 0.5 ) * 0.02 * delta;
|
|
cube.userData.velocity.y = ( Math.random() - 0.5 ) * 0.02 * delta;
|
|
cube.userData.velocity.z = ( Math.random() * 0.01 - 0.05 ) * delta;
|
|
cube.userData.velocity.z = ( Math.random() * 0.01 - 0.05 ) * delta;
|