Grappling Hook
by mr. self-destruct
In this we
shall go through how to make a grappling hook that uses real world
physics. This grappling hook is a offshoot of Pfhoenix's early work on the
RealGrapple, so thanks Pfhoenix, Frederico & Gopher42, this grapple
wouldn't exist without you guys ;)
| angular velocity = 2 x Pi / period of rotation w = 2π / T |
| centripetral force = mass x radius x angular velocity
squared F = mrw^2 |
Grappling hook:
| class GrapplingHook extends TournamentWeapon;
var bool bHooked; replication simulated function Destroyed() Super.Destroyed(); simulated function Tick(float DeltaTime) if (bHooked) function StartGrapple() // Don't start grappling if we're already
grappling GetAxes(Pawn(Owner).ViewRotation, X, Y, Z); // End trace to stop people grappling stupidly long
distances if (Other == None) Other.TakeDamage(10.0, Pawn(Owner), HitLocation, 400.0 * X, 'grapple'); if (!Other.IsA('Pawn') && !Other.IsA('Projectile') &&
!Other.IsA('Decoration')) // Give the player a "kick" to get them
moving function StopGrapple() // Fire to begin grappling // AltFire to stop grappling state NormalFire state AltFiring // Putting down weapon in favor of a new one function BeginState() defaultproperties |
| class GChain extends Projectile;
var GChain Chain; simulated function
Destroyed() simulated function CheckBeam(vector X, float DeltaTime) simulated function UpdateBeam(GChain ParentChain, vector Dir,
float DeltaTime) defaultproperties |
| class StarterChain extends GChain;
var vector HookLocation; replication simulated function Tick(float DeltaTime) defaultproperties |