Warning: virtual() [function.virtual]: Unable to include '/banner/telefragged/front.cgi' - request execution failed in /usr/local/etc/httpd/skew.telefragged.com/mods/hl2/ARGG/index.php on line 19


Adnan's Rotational Gravity Gun

who | what | when | where | why | how



WHO
My name is Adnan Zafar and I created ARGG.  My e-mail address is: adnan.f.zafar AT gmail DOT com. 
Check out my website, skew.telefragged.com, where I have other mods for other games.

Please e-mail me if you have any suggestions for this mod, would like to mirror it, would like the source code, etc.



WHAT
ARGG is a single player mod for Half-Life 2.  It allows you to rotate the object you are holding with the gravity gun while pressing the "use" button and moving your mouse.

The gun implements two rotation modes which are pretty different from each other.  Experiment with both modes to see which one feels most natural for you.



WHEN
ARGG was created over a few days and version 1.0 was released on December 22, 2004.



WHERE
You can download ARGG at the following locations: UPDATE:
There are a few mods out there using the ARGG sourcecode.  Download them and give them a try.



WHY
I created ARGG for two reasons.

First, in the original Half-Life 2, I had trouble aligning objects in order to get them through doorways.  I had to pick them up and try to launch them through, hoping they would somehow make it out to the other side.

Second, I had trouble using items as proper shields against snipers and combine soldiers.  I wasted a lot of time doing the whole "pick up and drop" routine on objects to get them to face the gunfire properly. 

Both of these problems are solved with ARGG.

I believe that the extra degrees of freedom gained through the use of this mod will make the Gravity Gun a more potent weapon.  The mod is a very slight change to the game, while it could potentially bring upon a dramatic change in the gameplay dynamics, depending on how it is used.



HOW
These directions are also included in the README.TXT in the zip file and in the mod's directory.

I.   INSTALLING
Extract the contents of ARGG1.zip to the %STEAM%\SteamApps\SourceMods\ directory.

II.   LAUNCHING
Start up steam and click on the "Play Games" button.  This mod will be listed as "argg" under "Third Party Games".  Double click on "argg" to launch ARGG.

III.  INSTRUCTIONS
When you have picked up an object with the gravity gun, hold down the "use" button and move your mouse.  This will cause the object in your grasp to rotate, but your view will remain locked.

IV.   CONFIGURATION
There is one new console variable, "physcannon_rotate", which controls how the Rotational Gravity Gun works.  Changing this from the console will take effect immediately in the game.

It has 3 possible values:

- "physcannon_rotate 0"
This turns off the ability to rotate what you're holding.

- "physcannon_rotate 1"
This lets you control the absolute orientation of the object.  This mode is enabled by DEFAULT.

- "physcannon_rotate 2"
This lets you control the orientation of the object relative to it's last orientation.  This mode is similar to how a ship is rotated in a space flight simulator.

All of the chapters have been unlocked so you don't have to play through the game from the beginning.

V.   HOW THE CRAP DOES IT WORK?
The inner workings of ARGG are very simple.

When you press "use", your viewangles are saved as the current 'use angles'.

While you are holding down the "use" button and grasping an object with the gravity gun, ARGG overrides your viewangles with the 'use angles' but still allows you to perform mouse input.  ARGG then checks for the change in your mouse coordinates every game 'tick', and uses those to compute new angles for this 'tick'.

The angles are applied in one of two ways: to create an absolute orientation, or to create a relative orientation.

1.   Absolute orientation:
Your new angles are taken and added to the previous 'attached angles' of the object in player space.  These angles then create a rotation, which are transformed into world space, and are finally applied to the object you are grasping.  The new 'attached angles' are then saved to be used again in the next 'tick'.

2.   Relative orientation:
Your new angles are taken and used to create a new 'relative delta orientation', which represents how your mouse movement will cause the object to change from it's 'current orientation'.  This orientation is applied to the 'current orientation' of the object, which is obtained from it's current 'attached angles' in player space.  This resulting orientation is the 'new orientation' of the object after you have moved your mouse.  This orientation is converted from player space to world space and finally applied to the object being grasped.