Closed mikkailmontgomery closed 8 years ago
Same as https://github.com/maxogden/voxel-engine/issues/67 Camera is shaky when player coordinates are large?
Yes, I'm sorry, not sure how I missed that, I had looked through the list of open issues. Guess I shoulda looked closer, thanks. I'll close this as its a dup.
Take the code below, it will function fine. However, if you were to change "largenumber" to -12345678 then dude falls through the world, or if you move while falling, and happen to not fall through the world, camera movement/movement in general is strange. if you change "largenumber" to -123456789 the world does not render at all.
var largenumber = -1234567 var createGame = require('voxel-engine') var game = createGame({ textures : './textures/', materials: [['grass', 'dirt', 'grass_dirt'], 'brick', 'dirt'], materialFlatColor: false, generate: function(x, y, z) { return y === 1 ? 1 : 0 }, worldOrigin: [largenumber, 0, 0], container : document.querySelector('#container') }) game.appendTo(container) game.createBlock([largenumber, 10, 0], 2) var createplayer = require('voxel-player')(game) var dude = createplayer() dude.possess() dude.yaw.position.set(largenumber, 100, 0)