public V3 Vector3ToV3(Vector3 vector3, float GridSize) { var v = VoxelRenderManager.Fixed(vector3, GridSize); var v3 = new V3(); v3.x = (int)(v.x / GridSize + 0.5f); v3.y = (int)(v.y / GridSize + 0.5f); v3.z = (int)(v.z / GridSize + 0.5f); return(v3); }
public void RenderVoxel(Transform voxel, Transform bone, Vector3 bindPose) { voxel.transform.rotation = Quaternion.identity; voxel.transform.position = VoxelRenderManager.Fixed(bone.transform.position - (bone.right * bindPose.x + bone.forward * bindPose.z + bone.up * bindPose.y), GridSize); }