Author Topic: Help creating architect walk through  (Read 1075 times)

Offline nsnatraj

  • byte
  • *
  • Posts: 8
    • View Profile
Help creating architect walk through
« on: July 10, 2012, 08:21:56 am »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: Help creating architect walk through
« Reply #1 on: July 10, 2012, 04:04:43 pm »
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.

Offline nsnatraj

  • byte
  • *
  • Posts: 8
    • View Profile
Re: Help creating architect walk through
« Reply #2 on: July 12, 2012, 06:04:42 am »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: Help creating architect walk through
« Reply #3 on: July 12, 2012, 07:20:01 am »
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... ???

Offline nsnatraj

  • byte
  • *
  • Posts: 8
    • View Profile
Re: Help creating architect walk through
« Reply #4 on: July 12, 2012, 01:14:06 pm »
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?


Offline nsnatraj

  • byte
  • *
  • Posts: 8
    • View Profile
Re: Help creating architect walk through
« Reply #6 on: July 13, 2012, 08:41:51 am »
Thanks.. its working.  ;D

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