Game Development Community

dev|Pro Game Development Curriculum

Updated GuiObjectView for TGEA 1.7.1 and 1.8.0

by Jaimi McEntire · 02/01/2009 (12:31 pm) · 26 comments

This is an updated GuiObjectView for TGEA versions 1.7.1 and 1.8.0. This includes new properties for lighting and interaction, and a bug fix.

Link: GuiObjectView Link

What's New:

Bug Fix: If the model is larger than 5 units, the Min and Max distance are automatically adjusted.

Bug Fix: SetSeq (SetObjectAnimation) was doing nothing. Thanks Mike!

New Properties:
Azimuth - The angle of the light around the Z axis (degrees)
Elevation - The Pitch of the light (degrees)
LightColor - The color of the light (ColorF)
Ambient - The ambient color (ColorF)


LockOrbit - Locks the orbit distance (bool)
OrbitDistance - The distance that the orbit distance is locked at (F32)

LockXRotation - Locks the rotation on the X axis (bool)
LockedXRotation - The value the X axis rotation is locked at (F32, Radians)

LockZRotation - Locks the rotation on the Z axis (bool)
LockedZRotation - The value that the Z Axis is locked at (F32, radians)

For example, If you only want the user to scroll around the object (instead of looking at the top and bottom):


MyObjectView.LockXRotation = true;
MyObjectView.LockedXRotation = 0;

Perhaps you want the lighting to be off center, to give a better shaded look:

MyObjectView.Azimuth = 190;
MyObjectView.Elevation = 45;
MyObjectView.Ambient = "0.3 0.3 0.3 1"; // Lower the ambient color

The zip file contains versions for both TGEA 1.7.1 and TGEA 1.8.0 in separate directories.

Still several things I plan to do:

1. Add support for multiple attachments (currently it's limited to 1)
2. Draw a shadow under the player to give a more 3D appearance

Update:

Added animation support thanks to Matt J. The zip file has been updated.
Page«First 1 2 Next»
#21
06/11/2009 (10:54 pm)
My Objview.cs codes...
/// Callback when the control wakes up.
function RoleOBJView::onWake(%this)
{
...
RoleOBJView.setModel($defaultGame @ "/data/shapes/players/sf001/sf001.dts");
 RoleOBJView.setMount($defaultGame @ "/data/shapes/weapons/Sword/sword001d/sword001d.dts",0);
 RoleOBJView.setMount($defaultGame @ "/data/shapes/equips/Shield/shield001d/shield001d.dts",6);
RoleOBJView.setSeq(2); //walk action
sf001.cs
datablock TSShapeConstructor(sf001Dts)
{
   baseShape = "./sf001.dts";
   sequence0 = "~/data/shapes/players/sf001/ready.dsq root";
   sequence1 = "~/data/shapes/players/sf001/walk.dsq walk";
   sequence2 = "~/data/shapes/players/sf001/walk.dsq walk";
   sequence3 = "~/data/shapes/players/sf001/attack1.dsq attack";
   sequence4 = "~/data/shapes/players/sf001/attack1.dsq run";
};
#22
06/11/2009 (11:55 pm)
when call setSeq function, datablock(TSShapeConstructor) is must be loaded?
#23
06/12/2009 (6:24 pm)
The link is dead. If someone could please send me the latest version of the resource I'll host it and update it for TGEA 1.8.1(if needed). thanks!
#24
06/16/2009 (6:09 am)
The domain is back up. Sorry for neglecting to renew it.
#25
02/18/2011 (1:30 am)
Is this still available ? Can some one post the link here ?
#26
02/18/2011 (1:55 am)
I'm currently using TGEA 1.8.2. When I set the model it display nicely with animation.

But if I resize the window in window mode, the texture of the model become black color.

Anyone face the same problem like mine ?
Page«First 1 2 Next»