Game Development Community

GuiPlayerView

by Derrick Austin · in Technical Issues · 11/21/2007 (9:36 pm) · 7 replies

***Code edited with code that works***

GuiPlayerView example:

new GuiPlayerView(PlayerView)
    {
        profile     = "GuiDefaultProfile";
        horizSizing = "relative";
        vertSizing  = "relative";
        position    = "100 100";
        extent      = "300 350";
        minExtent   = "8 8";
        visible     = "1";
        helpTag     = "0";
        cameraZRot  = "0";
        forceFOV    = "40";
    };

**Note, you must use full path here**

PlayerView.setmodel("control/data/shapes/player/player.dts","control/data/shapes/player/player.jpg");

#1
11/23/2007 (6:56 am)
I've used it in the past and here's the code which works under 1.5.2:

new GuiPlayerView(playerview) {
                  canSaveDynamicFields = "0";
                  Profile = "GuiDefaultProfile";
                  HorizSizing = "width";
                  VertSizing = "bottom";
                  Position = "0 0";
                  Extent = "170 180";
                  MinExtent = "8 2";
                  canSave = "1";
                  Visible = "1";
                  hovertime = "1000";
                  applyFilterToChildren = "1";
                  cameraZRot = "0";
                  forceFOV = "0";
               };

and then

playerview.setModel("starter.fps/data/shapes/player/chr_elf/elf.dts", "");

The only difference being that I used the full path "/starter.fps/data/etc" rather than using the "~/data/etc" not sure if that would help or not.
#2
11/23/2007 (7:03 am)
Well you look at that.... **Stares in amazement...***

Thanks! Who would have known you needed the full path instead of the ~ that works everywhere else?

Thanks again!!!
#3
08/11/2009 (11:19 am)
Where do I apply this code? What files? Thanks.
#4
08/11/2009 (5:13 pm)
Been awhile since I've done anything with Torque; but I believe it will work in any of the gui files.

The playerView part goes in the corrosponding .cs file.
#5
08/12/2009 (1:02 pm)
Ok thanks, I got it.
#6
08/12/2009 (3:18 pm)
Ok now the player is like in the center of the screen. I can rotate around the character and view it, but it cut part of the head off. How do I bring it down a little? Thanks.
#7
08/12/2009 (3:32 pm)
I figured it out. Thanks.