• Scaling the player: make the map "seem" bigger?
    4 replies, posted
Hello, I'm trying to make a survival type gamemode, and I found that if I scale the player and change their movement speed, I can make the map seem 10x bigger than it actually is. My question: How would I scale the player? I know i'm gonna have to hook into calcview to draw the camera down a little, but how do I just scale the player?
for physics: [b][url=http://gmodwiki.net/Lua/Classes/Player/SetHull]Lua/Classes/Player/SetHull[img]http://gmodwiki.net/favicon.ico[/img][/url][/b] [b][url=http://gmodwiki.net/Lua/Classes/Player/SetHullDuck]Lua/Classes/Player/SetHullDuck[img]http://gmodwiki.net/favicon.ico[/img][/url][/b] for visuals (I think): [b][url=http://gmodwiki.net/Lua/Classes/Entity/SetModelScale]Lua/Classes/Entity/SetModelScale[img]http://gmodwiki.net/favicon.ico[/img][/url][/b]
What about scaling the player model?
[code] local min = Vector( -16 * scale, -16 * scale, 0 ) local max = Vector( 16 * scale, 16 * scale, 64 * scale ) -- local maxduck = Vector( 16 * scale, 16 * scale, 36 * scale ) local stepsize = math.Round( 18 * scale ) _lp:SetModelScale( scale, 0 ); _lp:SetRenderBounds( min, max ) --This should fix the player randomly disappearing. _lp:SetHull( min , max ) -- Player:SetHullDuck( min , maxduck ) _lp:SetViewOffset( Vector( 0, 0, 64 * scale ) ) _lp:SetViewOffsetDucked( Vector( 0, 0, 32 * scale ) ) _lp:SetStepSize( stepsize ) if ( updatebones ) then _lp:SetupBones( ); end[/code] The scale isn't correct in this snippet; use OBBMins and OBBMaxs to get the size. Also, it is more complicated than that. Many have tried. The most complicated part is resizing vehicles. The rest isn't that bad ( aside from resizing a map ). If you scale to 0.5, you'll have a map 4 times the size... 0.25 = 16 times the size... Don't go too much smaller because you don't want to run into accuracy issues ( movement speed, etc ).
Also you probably should not scale by a factor of 10, powers of 2 tend to work better for practically anything.
Sorry, you need to Log In to post a reply to this thread.