I am creating a 3DModel scene editor and i want to scan through a list of models , each one of which will be displayed at screen centre. I have no problem with that, i just need to parent displayed "temporary" model display to camera.
However i want the models to be displayed all the same size. No problem i thought, i'll use fitmesh, thus:
This works for displaying any model in my "expected area".
But then my problems start when i select the model (having first unparented it - entityparent tmpry\obj,0 )and try to place it on a terrain using pickedX#, pickedY#, pickedZ. Whereas, before trying to use fitmesh in my program, the model would drop nicely right onto the picked coordinates, now using fitmesh the model floats above the ground, and is displaced a distance on the X and Y axis ( roughly i need to adjust picked coords by -1.85) to get approx right.
This discrepancy would be even greater if i hadnt made fitmesh x,y,z coords 0,0,0.
Can anyone put me straight please?
Also, i want to scale the selected 3d Model up or down, but i dont understand whether or not fitmesh has scaled the model in real terms or just temporarily. If it has rescaled in real terms, does that mean that scaleentity 3dmodel, 1,1, 1 is now the "base" size of the model?
As always your assistance would be greatly appreciated
However i want the models to be displayed all the same size. No problem i thought, i'll use fitmesh, thus:
tmpry.tempmodel = new tempmodel tmpry\obj=copyentity(3Dmodel(g)) ; load my chosen model entityparent tmpry\obj, cam, 0 fitmesh tmpry\obj,0,0,0,6,6,6,1 positionentity tmpry\obj,-3, -4,10
This works for displaying any model in my "expected area".
But then my problems start when i select the model (having first unparented it - entityparent tmpry\obj,0 )and try to place it on a terrain using pickedX#, pickedY#, pickedZ. Whereas, before trying to use fitmesh in my program, the model would drop nicely right onto the picked coordinates, now using fitmesh the model floats above the ground, and is displaced a distance on the X and Y axis ( roughly i need to adjust picked coords by -1.85) to get approx right.
This discrepancy would be even greater if i hadnt made fitmesh x,y,z coords 0,0,0.
Can anyone put me straight please?
Also, i want to scale the selected 3d Model up or down, but i dont understand whether or not fitmesh has scaled the model in real terms or just temporarily. If it has rescaled in real terms, does that mean that scaleentity 3dmodel, 1,1, 1 is now the "base" size of the model?
As always your assistance would be greatly appreciated