bevy_vox_mesh icon indicating copy to clipboard operation
bevy_vox_mesh copied to clipboard

.Vox Meshes are imported offset within large blank mesh

Open madamc opened this issue 2 years ago • 1 comments

In the "basic" example, if you spawn a cube at the same location as a .vox model, it appears that the .vox model is imported within a larger shape, but is positioned at one of the corners of the invisible shape. If you rotate the transform of the .vox mesh, it rotates around the center point of the invisible shape.

madamc avatar Apr 23 '23 14:04 madamc

The origin of the loaded vox meshes is at the the origin of the shape containing them ((0, 0, 0)), so the one of the bottom corners as you mentionned. An option to add an offset to the meshes can probably be added to set their origin to the "mesh" gravity center, as per what bevy does by default.

Game4all avatar Apr 29 '23 11:04 Game4all