Game Development Community

Changing Scale Of Player

by Mike Wigand · in Torque Game Engine · 03/06/2002 (12:08 pm) · 9 replies

Is there anyway to change the scale of the player model in either the engine code or scripts? If so, where should this be done at?

Thanks,

Mike Wigand

#1
03/06/2002 (3:45 pm)
In the player's initial update you can change it's scale.

In game.cs:

// Create the player object
   %player = new Player() {
      dataBlock = LightMaleHumanArmor;
      client = %this;

      scale = "2.0 2.0 2.0"; // <--Add this--<<
   };
   MissionCleanup.add(%player);

You can also change it in the map editor.

I don't think changing the scale works very well though. Try it and see, if I remember right the collision box stays the same, the eye and cam nodes stay the same too.
#2
03/07/2003 (11:10 am)
I've submitted a resource for dynamically changing the scale of the player, vehicles, and objects:

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3977
#3
03/07/2003 (11:19 am)
Conrad, does this properly scale the player animations as well? I had a problem with this last spring.
#4
03/07/2003 (11:34 am)
The player runs fine, mount points scale in position so instead of having a giant tote a gun around his feet, it's in his arms. Give it a try.
#5
03/15/2003 (9:12 am)
Hello folks!

Well talking about scaling player, i was wondering what are the impact of scaling up or down. For example if i have the standard player scale 10x bigger(i want it to become a super giant), is this going to make it more slower? Or if i do the opposit i make 10x smaller, will it run much more faster? I ask this because we made vehicle with different scale (but use around the same number of polys) and the bigger scale vehicle is making the machine crawl to a ridiculous speed.

Thanks!
#6
03/15/2003 (10:51 am)
A bigger vehicle or player collides with more polygons, since the terrain mesh is essentially fixed size. That's a likely source of slowness. I noted when I made a giant player that things would get slow.

It's a mystery to me at the moment, but at least it works as opposed to Not Working. :)
#7
03/15/2003 (11:40 am)
@Conrad
This was my though also ;-), i just wanted to get some confirmation from other people! So ill tell our modelers to be more carefull on their model scale.

Thanks for the confirmation.
#8
03/18/2003 (9:49 am)
Just a note, if you've used my Dynamically Scaling Players, Vehicles, and Objects resource, could you leave feedback there? Tim Gift wants to know how well my patch works before making a decision on whether or not to include it in Head. :)

That resource is here: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3977
#9
03/24/2003 (11:04 am)
You should apply this higher up in the class hierarchy. I don't think it works with stuff like debris and static shapes. I could be wrong - havn't tried, but it seems to be player-specific.