Hi guys,
I am fighting with scale for some time, so I created a simple example and was surprised bz the result. The Object3D was a triangle, created by addTriangle method, I created a clone of the same object and scaled it, expecting the 0,0,0 point to be still on the same spot. Surprise surprise this didnot happend and I am trying to understand why and what I have to do to get the result I expected.
Source code:
Object3D o1 = new Object3D(1);
o1.addTriangle( new SimpleVector(-10f,-10f,0), 0, 0,
new SimpleVector(-10f,10f,0), 0, 1,
new SimpleVector(0f,0f,0), 1, 1,
texID);
o1.setScale(1);
world.addObject(o1);
Object3D o2 = new Object3D(o1);
o2.setScale(2);
world.addObject(o2);
The result is in attachment. Short to say, the triangles are scaled from theirs centers, not from the 0,0,0 point.
Thanks,
Darai
[attachment deleted by admin]