Game Development Community

Scaling in guiPlayerView

by Claude-Alain Fournier · in Torque Game Engine · 04/12/2005 (8:57 am) · 3 replies

Hi all,

Got that control working nicely. But in our project we like to have player be able to change model size to a certain extent and I like this change to show real-time in the GuiPlayerView when player select the model.

Now I have been studying the code like crazy to see how I could add model scaling.

I though that it would be intelligent to pass ObjectScale as parameters to the render method (TSShapeInstance render). This scale is then stored along with other information used in render (see setStatics(...)) But I realised that ObjectScale is never used. I did some research and found no occurence of the render function being passed anything else than the default NULL pointer. (maybe GG personel could let us know about the reason, maybe that's remaining from older code).

Ok now I am passing that scale value and I like to use it. But I have absolutely no idea how. Anyone has a clue ?

Thanks in advance.

CAF

#1
04/12/2005 (9:13 am)
Maybe zoom the camera out instead of scaling the player? I know it's a hack but I did it to make 3D items fit in an inventory window with GuiObjectView, I see no reason for it not to work for what you want.
#3
04/12/2005 (9:44 am)
Thanks Owen, this seem to be what I was looking for, maybe much more than I expected. I will try this ressource asap.

You saved my day.

CAF