I’ll quickly respond to this before the thread dies…
"DarkProphet" wrote:
Perhaps you could set the interpolation of the update method to 1/TicksPerSecond instead of me having to have a variable set for the number of ticks and doing it manually.
That would sort of defeat the point. I would like it to be clear that there is no interpolation value, nor is one needed. Its inclusion may confuse some people, I'm afraid.
"DarkProphet" wrote:
Oh yeah, could you perhaps explain the interpolation value of the rendering method please? I dont seem to understand it very well...
The interpolation value for the render(float) method specifies, as a percentage, how far between ticks the current rendering is. So, a value of 0.5 would mean that rendering is occuring at a time that is halfway between two logic ticks.
Interpolation is used to avoid rendering the same thing multiple times. For example, if render(float) was called three times between update(float), it may be drawing the exact same thing every time as the objects' positions haven't changed. However, with interpolation, we can draw objects at a position part way between one tick and the next.
but as i'm going to (try to) make some kind of rts i'll just be setting the height of the objects ;)
ok ... and set the rotation to have it look right on the terrain ... (which is actually the problem ;) ... but it is supposed to work ... have to recheck some things tomorrow) ...
btw ... i think it's a little bit confusing that jME sets the z axis as depth ... but i guess i should get used to it, shouldnt i ? ;)
Vector3f location = new Vector3f(0, 0, 0);
Vector3f left = new Vector3f(-1, 0, 0);
Vector3f up = new Vector3f(0, 0, -1);
Vector3f dir = new Vector3f(0, 1, 0);
cam.setFrame(location, left, up, dir);
The above code sets the Z axis as above, the Y Axis becomes the depth and the x axis is right. Just like in 3D Studio Max....
sure … but this doesn’t affect other objects … i’d had to rotate everything by 90° … or … ( little light blinks up over my head ) found smiley … i just have to rotate the rootNode if everything else would be attached to it right?
actually no … at least before jME i haven’t seen one 3d system which was aligned this way … (expect from math classes … where i have some problems with it )
The decision is based on RenderWare and NetImmerse. While it may seem strange, there is a reason behind it believe it or not. Because you can now define your camera axis as: (1, 0, 0), (0, 1, 0) (0, 0, 1) (left, up, direction). You have an identity matrix.
[1 0 0]
[0 1 0]
[0 0 1]
Thus, we now can have a camera node, that behaves like everything else.