RuneI
Class RopePoint

source: c:\runehov\RuneI\Classes\RopePoint.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--RuneI.Accelerator
         |
         +--RuneI.RopePoint
Direct Known Subclasses:None

class RopePoint
extends RuneI.Accelerator

//============================================================================= // RopePoint. //=============================================================================
Variables
 float DampFactor
           Dampening factor [0..1] (0 = no dampening)
 float MaxVelocityPickup
           Maximum velocity transfer allowed from collision
 RopePoint NextPoint
           Next Point in Rope
 name NextTag
           Tag of next ropepoint
 vector OriginalPos
           Equillibrium positon
 RopePoint PrevPoint
           Prev Point in Rope
 name PrevTag
           Tag of prev ropepoint
 float SpringConstant
           Spring Tension constant [0..] (0 = no tension)
 bool bAnchored
           If this point is anchored in place


Function Summary
 void PreBeginPlay()
 void RopePointTick(float DeltaSeconds)
 void Tick(float DeltaTime)



Source Code


00001	//=============================================================================
00002	// RopePoint.
00003	//=============================================================================
00004	class RopePoint extends Accelerator
00005		native;
00006	
00007	var() name NextTag;						// Tag of next ropepoint
00008	var() name PrevTag;						// Tag of prev ropepoint
00009	var RopePoint NextPoint;				// Next Point in Rope
00010	var RopePoint PrevPoint;				// Prev Point in Rope
00011	
00012	var() bool bAnchored;					// If this point is anchored in place
00013	var() float SpringConstant;				// Spring Tension constant [0..] (0 = no tension)
00014	var() float DampFactor;					// Dampening factor [0..1] (0 = no dampening)
00015	var() float MaxVelocityPickup;			// Maximum velocity transfer allowed from collision
00016	
00017	var vector OriginalPos;					// Equillibrium positon
00018	
00019	
00020	native(652) final function RopePointTick(float DeltaSeconds);
00021	
00022	function PreBeginPlay()
00023	{
00024		local RopePoint A;
00025		local int adj;
00026	
00027		// Validate user set variables
00028		DampFactor = FClamp(DampFactor, 0.0, 1.0);
00029	
00030		// Link the rope list
00031		NextPoint = None;
00032		foreach AllActors(class'RopePoint', A, NextTag)
00033		{
00034			NextPoint = A;
00035			break;
00036		}
00037		PrevPoint = None;
00038		foreach AllActors(class'RopePoint', A, PrevTag)
00039		{
00040			PrevPoint = A;
00041			break;
00042		}
00043		
00044		OriginalPos = Location;
00045		
00046		if (bAnchored)
00047		{	// Fix the anchor to the current location
00048			SetPhysics(PHYS_NONE);
00049		}
00050		
00051		// Create a collision actor that encompasses the entire rope to wake up rope ?
00052		
00053	}
00054	
00055	
00056	function Tick(float DeltaTime)
00057	{
00058	}
00059	
00060	defaultproperties
00061	{
00062	     SpringConstant=2000.000000
00063	     DampFactor=0.100000
00064	     MaxVelocityPickup=100.000000
00065	     Physics=PHYS_Projectile
00066	     CollisionRadius=20.000000
00067	     CollisionHeight=20.000000
00068	     bCollideActors=True
00069	     bCollideWorld=True
00070	}

End Source Code