Help creating architect walk through

Started by nsnatraj, July 10, 2012, 08:21:56 AM

Previous topic - Next topic

nsnatraj

I am creating a POC for a architect walkthrough on android using game engine. I came across JPCT and trying out some things. But I am not able to

  • Add buttons for moving the camera.
  • Move the camera based on swipe/button press like in FPS game
Any pointers to how to do it would be very much appreciated.

EgonOlsen

jPCT is a 3D engine, not a GUI toolkit. If you want to add buttons, either use the means provided by Android itself or create your own button implementation by blitting some texture data containing the button images on screen and evaluate the current touch position to see if it got pressed.

nsnatraj

I added the buttons in the Android code but they are not shown on the UI. I had used the HelloWorld example and in the layout\main.xml file I added two buttons but when I run the project if does not show the buttons. so I tried adding a overlay,  but the overylay image is covering the whole screen. :(

Can you let me know how and where the worldspace is inserted in the UI by jPCT?

EgonOlsen

The Overlay covers the whole screen if you say that it should. If you don't want that, give it other coordinates. The Android-button-thingy is solely an Android issue and i can't comment on this. I'm only using the means that Android provides to render GL output into. It's out of the scope of the engine and this forum to handle mixing of Android's GUI components with that output...how and if...

Quote
Can you let me know how and where the worldspace is inserted in the UI by jPCT?
...no idea what this is supposed to mean... ???

nsnatraj

sorry went through the android documentation  ;D and found that when OpenGL renders it takes what ever screen space is available.  ;D

I did set other coordinates using "setSourceCoordinates" but no use  :(.

Am I right or am I missing something?


nsnatraj

Thanks.. its working.  ;D

I was using "Overlay(World world, FrameBuffer buffer, java.lang.String textureName) "