Game Development Community

GuiObjectView-->why it never works !

by Ahsan Muzaheed · in Torque 3D Beginner · 05/19/2012 (5:23 pm) · 10 replies

i was trying to show a model through GuiObjectView control.
but it just do nothing.
no error or warning.but sometimes it crash t3d without any error or warning.

here is my objectDlg.gui:

//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(objectDlg) {
   position = "0 0";
   extent = "1024 768";
   minExtent = "8 2";
   horizSizing = "right";
   vertSizing = "bottom";
   profile = "GuiDefaultProfile";
   visible = "1";
   active = "1";
   tooltipProfile = "GuiToolTipProfile";
   hovertime = "1000";
   isContainer = "1";
   canSave = "1";
   canSaveDynamicFields = "1";

   new GuiObjectView() {
      shapeFile = "art/shapes/items/kit/healthkit.dts";
      mountedNode = "mount0";
      lightColor = "1 1 1 1";
      lightAmbient = "0.5 0.5 0.5 1";
      lightDirection = "0 0.707 -0.707";
      orbitDiststance = "5";
      minOrbitDiststance = "0.917688";
      maxOrbitDiststance = "5";
      cameraSpeed = "0.01";
      cameraZRot = "0";
      forceFOV = "0";
      reflectPriority = "0";
      margin = "0 0 0 0";
      padding = "0 0 0 0";
      anchorTop = "1";
      anchorBottom = "0";
      anchorLeft = "1";
      anchorRight = "0";
      position = "422 145";
      extent = "245 327";
      minExtent = "8 2";
      horizSizing = "right";
      vertSizing = "bottom";
      profile = "GuiDefaultProfile";
      visible = "1";
      active = "1";
      tooltipProfile = "GuiToolTipProfile";
      hovertime = "1000";
      isContainer = "1";
      canSave = "1";
      canSaveDynamicFields = "0";
   };
};
//--- OBJECT WRITE END ---

i have searched forum threads related to GuiObjectView.but only 2-3 thread related to any issue was found.not much helpful.
looks like nobody have any issue with it.
then what is wrong with my part! ! !

About the author

Torque 3D enthusiastic since 2010.Have been working in several T3D projects besides of Unreal Engine 4 and Unity 3D. NEED a hand with your project? SHoot me a mail. http://www.garagegames.com/community/forums /viewthread/138437/


#1
05/19/2012 (5:59 pm)
here is another try from this thread(http://www.garagegames.com/community/forums/viewthread/129110).
although i did not use the fix:

1.open(game/art/gui/mainMenuGui.gui) with notepad.
2.replace everything with my one:
from (http://pastebin.com/deQr7YwE)

4.save it
5.launch game.
nothing shows on GuiObjectView !!!!!
#2
05/19/2012 (9:32 pm)
Added this fix?

http://www.garagegames.com/community/forums/viewthread/126414

while I haven't done extensive work with GuiObjectView, this did solve the problems I had.
#3
05/19/2012 (9:52 pm)
Quote:
while I haven't done extensive work with GuiObjectView, this did solve the problems I had.

plz tell me what was your problem?
my one is nothing shows on guiobjectview.
nothing!!!!
#4
05/19/2012 (11:30 pm)
do this;
guiObjectView.cpp:

1. FIND:
mCameraRot.set( 0.0f, 0.0f, 3.9f );
   mCameraPos.set( 0.0f, 1.75f, 1.25f );

2. REPLACE WITH:
mCameraRot.set( 0.0f, 0.0f, 0.0f );
   mCameraPos.set( 0.0f, 0.0f, 0.0f );

3. Build your exe.
and add a new objview window to your gui. You cam will start at 0,0,0 and face -Y. Adjust as needed in the GUI builder properties panel.
#5
05/20/2012 (7:05 am)
so problem is with camera rotation.
that means my objview is displaying object but camera is pointing to another direction.that is why i am not seeing the model in view!!!!.

#6
05/20/2012 (11:46 am)
yes, thats basically the issue, theres also a resource to modify the gui view to lock rotation of al directions, which i also find very useful.

It is a necessary fix imo, even if it doest fix you specific issue it will remove at least one issue form the equation allowing you to focus better.
#7
05/22/2012 (3:05 am)
thanks,it is working.
i have used this 2 fix:

http://www.garagegames.com/community/forums/viewthread/130599/1#comment-829003

http://www.garagegames.com/community/forums/viewthread/126414/1#comment-825677
#8
07/25/2013 (5:59 pm)
I was having problems getting GuiObjectView to display objects correctly as well. I followed the threads that @ahsan posted and it fixed the issue for me.

Surprised this hasn't been fixed in T3D yet.
#9
09/16/2014 (2:28 pm)
Yeah, still not fixed. =(
#10
09/16/2014 (3:03 pm)
Someone make a PR! We can't do everything ourselves ;).