Every time when I load a new 3D model into JME, I take alot of time to position it correctly on the main screen.
Since when the model is loaded, it always out of range of screen (depending on camera setup)
Also the model will have all kinds of orientation ( up side down … etc )
It usually take me an hour for every model to position correctly in the center of screen using Quaternion and using setLocalTranslation(-15.5f, 36f, 54):
Quaternion rotate4 = new Quaternion();
rotate4.fromAngleAxis(1.745f, new Vector3f(0, 1, 0));
m_bodyInstance2.setLocalTranslation(-15.5f, 36f, 54);
Is there any way to help visualize / locate model and put them correctly? on the screen?
if u set ur origin right in maya or 3d studio max or whatever modeling tool u r using, it should be fine after u import it.
any other better ways?
since the model is too big (usually) and need to scale to like 0.1f or 0l2f
also the model usually at (0,0,0) in 3ds max but goes out of range usually.
and model will go up side down … etc
I guess setting to cam to always look at (0,0,0) solve the problem?
it will take an hour for trial and error usually to get model at right angle and right size and right place
Using MW3D, perhaps would help:
give it a bounding box and subtract the bounding center from the node's local translation. this will center the node around 0/0/0.
for scaling, scale the model by 1/largest side of bounding box (now the model is 1 unit long), then scale it to the size you want.