by dpJudas » Sun Feb 26, 2017 4:33 pm
If we are talking about adding a value to the Z position of the voxel, then I think this is done in RenderVoxel::Project (r_voxel.cpp) by adding something to the 'pos' variable before it is stored in the vis object.
There's a line in there already saying this: "pos.Z -= thing->Floorclip". I'm assuming this is just another line added right after that.
Is this offset in world space or model space? If it needs to be in model space, then voxels already got a Pivot member. Implementing it in model space is probably a question of finding the places where Pivot is accessed in that file and add the new offset to the variable it copies Pivot.Z to.
If we are talking about adding a value to the Z position of the voxel, then I think this is done in RenderVoxel::Project (r_voxel.cpp) by adding something to the 'pos' variable before it is stored in the vis object.
There's a line in there already saying this: "pos.Z -= thing->Floorclip". I'm assuming this is just another line added right after that.
Is this offset in world space or model space? If it needs to be in model space, then voxels already got a Pivot member. Implementing it in model space is probably a question of finding the places where Pivot is accessed in that file and add the new offset to the variable it copies Pivot.Z to.