I'm trying to do some preprocessing of 3D models by allowing them to be rescaled when being imported by my engine. I would have thought it would just be a matter of repositioning its vertices but this doesn't appear to work even when using the vertexbuffer lock flag of 2, which the documentation seems to hint is for this purpose.
I've tried this; when saved and loaded back in the object is of its original size again:
function resizeObject(obj as dword, scale as float)
lock vertexdata for limb obj, 0, 2
verts = get vertexdata vertex count() - 1
for v = 0 to verts
x# = get vertexdata position x(v) * scale
y# = get vertexdata position y(v) * scale
z# = get vertexdata position z(v) * scale
set vertexdata position v, x#, y#, z#
next v
unlock vertexdata
endfunction
Do anybody have any ideas about this?
"Why do programmers get Halloween and Christmas mixed up?" Because Oct(31) = Dec(25)