Egon always first I wasted two hours to adjust my code and it doesn't worked until I saw that solution. jPCT has always what I need.
Thanks.
Thanks.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuobject.rotateY((float) Math.PI);
object.rotateMesh();
object.clearRotation();
object.translate(0, 0, move);
Rotating has mentioned function with setting reference, translation doesn't as I see. So it moves in one direction despite rotation, any clue to change this?
frameBuffer.clear();
frameBuffer.blit(sky,0,0,0,0,512,512,FrameBuffer.OPAQUE_BLITTING);
world.renderScene(frameBuffer);
world.draw(frameBuffer);
frameBuffer.display();
01-28 19:03:39.921: E/AndroidRuntime(893): FATAL EXCEPTION: GLThread 8
01-28 19:03:39.921: E/AndroidRuntime(893): java.lang.NullPointerException
01-28 19:03:39.921: E/AndroidRuntime(893): at com.threed.jpct.GLRenderer.blit(GLRenderer.java:1453)
01-28 19:03:39.921: E/AndroidRuntime(893): at com.threed.jpct.GLRenderer.execute(GLRenderer.java:1892)
01-28 19:03:39.921: E/AndroidRuntime(893): at com.threed.jpct.FrameBuffer.blit(FrameBuffer.java:587)
01-28 19:03:39.921: E/AndroidRuntime(893): at my.game.GameActivity$MyRenderer.onDrawFrame(GameActivity.java:870)
01-28 19:03:39.921: E/AndroidRuntime(893): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
01-28 19:03:39.921: E/AndroidRuntime(893): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
thing.translate(0, 0, move);
and even if I turn by making some rotation object moves forward along the old Z axis (e.g. when its rotatated the movement is from right to left, not "into the screen") why not the new ? Is it the same like with camera? private void moveCamera() {
SimpleVector oldCamPos = camera.getPosition();
oldCamPos.scalarMul(9f);
SimpleVector carCenter = car.getTransformedCenter();
SimpleVector zOffset = car.getZAxis();
zOffset.scalarMul(-250f);
SimpleVector camPos = new SimpleVector(carCenter);
camPos.add(camYOffset);
camPos.add(zOffset);
camPos.add(oldCamPos);
camPos.scalarMul(0.1f);
camera.setPosition(camPos);
camera.lookAt(carCenter);
}
Page created in 0.086 seconds with 12 queries.