hi,
i’m basing my program in “TestCameraMan” but i’m trying to display two objects at the same time in the screan, and the problem is that i only can do it with one at the time
i’ve tried to create a new tRenderer and an other fakeTex for the second object but i doesn’t works
could you help me please??
propably find their middle point (use vector3f.interpolate( 0.5) ), and then zoom out the camera a lot so everything is visible
mmm ok, thanks, i’ll try it …
but what i’ve seen is that in the function simpleRender (i dont know exactly how it works) but i know it takes just the last element send to the render and it is the object that shows in the monitor screen, i dont know how to make it show the two objects at the same time:
protected void simpleRender() {
lastRend += tpf;
if (lastRend > throttle ) {
tRenderer.render(nod, fakeTex); //nod is an avatar smaller than the one of TestCameraMan
tRenderer.render(esfera6, fakeTex2); //esfera6 is a little Sphere
lastRend = 0;
}
}
any idea why?? or how can i do it??
i dont understand why do you override simpleRender(); method.
Why not just use lookAt, setPosition etc, on cam ?
i’ve set the position to where i know i can see both objects
but i only can show one of the two objects (commenting the other in the simpleRender() function)
so i think it’s something about the texture or the camara that i cant do it with both of them
i haven’t seen any tutorial that uses simpleRender() method. Maybe its forbidden ?
I only know simpleUpdate() that you can override.
thanks a lot tralala
maybe it is jaja
well for what i see its almost like simpleRender(), should i add the second render there and use both, simpleRender and simpleUpdate??
sorry but i still have doubts
i’ve found: https://wiki.jmonkeyengine.org/legacy/doku.php/jme2:simplegame?s[]=simpleupdate
update(float)/simpleUpdate() - Update is called with a float value indicating the time since the last frame.
protected void simpleUpdate() {
if (tpf < 1) {
angle = angle + (tpf * 1);
if (angle > 360) {
angle = 0;
}
}
rotQuat.fromAngleAxis(angle, axis);
s.setLocalRotation(rotQuat);
}
is it what you was saying??
jaja after all it wasnt so difficult ups
i just attached both objects to the same node and rendered it in simpleRender
thanks a lot