Hello!
Further into my development of my voxel game, I hit an unusual situation.
Thanks to everyone’s help, I figured out how to render the voxels (and even add collisions). But, for some reason I am not able to position the entities that I procedurally create. So, I can MAKE the terrain, but I cannot MOVE it.
In game.js you will see the code. It is the first few lines in the createChunk() function that you will see this all play out. How come the entity will not move? I try to make multiple chunks in the initialize() function but it only seems to make one.
You can’t use setPosition on an entity that has a static/dynamic rigidbody component. You should be using the rigidbody.teleport() method for dynamic rigid bodies.
For static rigid bodies you should can use setPosition before you add the rigid body component. If you would like to move it at a later point, you should disable the rigid body component, set the position of the entity and re-enable: