Unreal Tournament 3 Game Mod - Magnet Gun | Download [.zip]


Magnet Gun Mod - The magnet gun is an Unreal Tournament 3 Game Mod, and is based off of the siggraph paper:

Thomaszewkski, B., Gumann, A., Pabst, S., and Straber, W. Magnets in Motion. Siggraph 2008. [PDF Here]

The gun was created as a weapon for Unreal Tournament for the PC, and utilizes the magnetic force equations found in the Magnets In Motion Siggraph paper. We tested the magnetic equations using the framework from a previous assignment by having boxes with dipole moments, and magnetic spheres. For the actual mod, we modeled a magnet in Maya, and used some pre-existing Unreal weapons and effects for the magnets. The magnet flight and behavior we took from the discs for the translocator, and added a blue or red spark effect based on the type of magnet fired by the user. The gun is normally the Rocket Launcher found in the game, and uses the same preset animations for firing to give it a feel of chambering in another magnet after each round fired.

User Controls - The left mouse click fires a magnet that attracts you to the magnet, and then causes a specific amount of damage per second while you are trapped in it's magnetic field. The right mouse click fires a secondary magnet that repels you away from it and turns you into a ragdoll, and while it doens't cause any damage, can force players off of certain areas or even off the map if used correctly. The magnets have a life of 5 seconds so if you get stuck in a magnetic field, you can escape after it disappears.


Installation - The Magnet Gun Mod consists of three parts: [Download .zip]

  • The MagnetGun folder with the mod code
  • The Weapons folder with a Magnet package file
  • The Config folder with the configuration settings in it

To install the code, you place the MagnetGun folder in the directory:

  • C:\Documents and Settings\$(USER)\My Documents\My Games\Unreal Tournament 3\UTGame\Src

The Weapons folder is placed in the directory:

  • C:\Documents and Settings\$(USER)\My Documents\My Games\Unreal Tournament 3\UTGame\Published\CookedPC

The configuration file gets placed in the directory:

  • C:\Documents and Settings\$(USER)\My Documents\My Games\Unreal Tournament 3\UTGame\Config

When you compile the code, make sure you add the package in the UTEditor.ini file, under the [ModPackages] section. (Add the line "ModPackages=MagnetGun" without the quotes)


Strategy - The idea of the Magnet Gun is to fire several magnets in succession so that other players are trapped in several magnetic fields and take damage from multiple magnets. Subsequently, if you are trapped in the magnetic field of one of the magnets, you can fire a secondary or oppositely charged magnet to repel yourself away and escape further damage. If you are on a level where there are environmental hazards like bridges and cliffs, using the secondary magnet can allow you to repel other players off the map for an instant kill. The ragdoll component makes the alternate fire very powerful as you can immobolize players by making them ragdolls so they have to wait until the collide with the ground before being able to move again.


Siggraph Components - The magnetic forces equations were implemented as shown in Magnets in Motion. However, we took a few small liberties in order to make the weapon more "playable" in Unreal Tournament. For example, the magnets in the environment do not affect each other, so as you can see in the pictures, the magnets do not attract or repel each other when in the environment, and only have magnetic affects on players. In addition, players are treated as metal objects, that can be attracted or repelled. Also, in theory, every magnet has an affect on every player in the game, but for the sake of optimizations for the game, we have a proximity check and only include forces that have a noticeable affect on the player.



Demo - These demo video shows the compilation of our work. The first two videos show the player engaging enemies and firing magnets to draw them into the magnetic field to cause damage. The player also gets drawn into several magnets and takes damage as well. Later on you can see the ragdoll effect as the user is repelled back by the secondary magnets.






Magnet Gun Final Presentation - The magnet gun final presentation shows the goals of the project, and the full demonstration of the gun in action in Unreal Tournament 3. The gun went through several iterations which are shown in the video. At first, the blue magnets had attractive forces a bit too strong which pulled the players way too close and threw them around uncontrollably. The repelling magnets had the same affect but pushed characters all over the place and oftentimes off the map. Interlaced in the video are a few cut scenes of our magnets in the test environment, with them repelling, attracting, and other behaviors. Finally, we have a bloopers section at the end showing the undesired but rather entertaining behaviors along the way.




Back to Projects Page