Note: for folks coming in from Wired, here’s the thermodynamics of the ideal gas law video.
Fun with slow motion cubes, graphs, and data! I like this video a lot.
sv_cheats 1 (only needs to be done once)
noclip (lets you fly around the room)
phys_timescale 0 (freezes objects in the game)
phys_timescale 1 (lets objects move normally again)
phys_timescale 0.25 (slow motion cubes!)
impulse 200 (removes/replaces portal gun)
bind “z” “noclip” (an example of linking console commands to keyboard shortcuts)
Really enjoy the idea of using this game as a physics lab simulator.
And it would be so much better to have all of the controls to the game so as to change any of the default parameters set in the game.
There’s already a lot you can do to play with the physics of the game, but it requires some knowledge of console commands. You have to activate the console first by right clicking on Portal 2 in your Steam library, going to properties, clicking on “Set Launch Options” and typing “-console”
Once activated, you can pull up the console any time in game by pressing the “~” button. The first command needs to be “sv_cheats 1” to allow you to change game parameters. After that, you can play with:
Gravity – “sv_gravity #” – replace the # with a number. The default is 600.
Time – “phys_timescale #” – replace the # with multiplier for the rate at which time passes. The default is 1, 0 will completely stop everything, and 0.5 will cause everything to move at half speed.
There are many other commands, found at https://developer.valvesoftware.com/wiki/Console_Command_List
Let’s say you want to be able to change gravity on the fly without going into the console. You can do so by using the command:
bind “f” “sv_gravity 300”
Now, gravity is cut to half of its original value every time you press “f.”
Hope this helps! Let me know if you have any other questions! I’ll be doing a big post on playing with physics with console commands soon!
[…] my last post about the effect of portals on cube velocity, I was asked about the actual velocity limit for cubes moving through portals. It’s easy to […]
[…] took a deeper look at my experiment from the last few posts and made a couple […]