Exemplo n.º 1
0
 internal CharacterMotor()
 {
     jumping			= false;		wasJumping			= false;
     maxSpeed		= 57.2f;		massPlayer			= 80;
     dampingGround	= 30.0f;		dampingAirborne		= 20.0f;
     modSprint		= 1.6f;			modCrouch			= 0.8f;
     speedAnterior	= 16.0f;		speedPosterior		= 10.0f;
     speedLateral	= 12.0f;		speedVertical		= 1.0f;
     extraHeight		= 4.1f;			slidingSpeed		= 15.0f;
     weightPerp		= 0.0f;			weightSteep			= 0.5f;
     lastStartTime	= 0.0f;			lastEndTime			= -100.0f;
     lateralControl	= 1.0f;			speedControl		= 0.4f;
     deltaCrouch 	= 1.0f;			deltaHeight			= 2.0f;
     deltaPitch		= 0.2f;			deltaStep			= 0.3f;
     velocity		= Vector3.zero;	lastVelocity		= Vector3.zero;
     groundNormal	= Vector3.zero;	lastGroundNormal	= Vector3.zero;
     jumpDir			= Vector3.up;	inputMove			= Vector3.zero;
     hitPoint		= Vector3.zero;
     lastHitPoint 	= new Vector3(Mathf.Infinity,0,0);
     jump 			= new util::key((n)=>jump.input=n);
     dash			= new util::key((n)=>dash.input=n);
     duck 			= new util::key((n)=>duck.input=n);
     axisX 			= new util::axis((n)=>axisX.input=n);
     axisY 			= new util::axis((n)=>axisY.input=n);
 }
Exemplo n.º 2
0
 internal CharacterMotor()
 {
     jumping        = false;                wasJumping = false;
     maxSpeed       = 57.2f;                massPlayer = 80;
     dampingGround  = 30.0f;                dampingAirborne = 20.0f;
     modSprint      = 1.6f;                 modCrouch = 0.8f;
     speedAnterior  = 16.0f;                speedPosterior = 10.0f;
     speedLateral   = 12.0f;                speedVertical = 1.0f;
     extraHeight    = 4.1f;                 slidingSpeed = 15.0f;
     weightPerp     = 0.0f;                 weightSteep = 0.5f;
     lastStartTime  = 0.0f;                 lastEndTime = -100.0f;
     lateralControl = 1.0f;                 speedControl = 0.4f;
     deltaCrouch    = 1.0f;                 deltaHeight = 2.0f;
     deltaPitch     = 0.2f;                 deltaStep = 0.3f;
     velocity       = Vector3.zero; lastVelocity = Vector3.zero;
     groundNormal   = Vector3.zero; lastGroundNormal = Vector3.zero;
     jumpDir        = Vector3.up;   inputMove = Vector3.zero;
     hitPoint       = Vector3.zero;
     lastHitPoint   = new Vector3(Mathf.Infinity, 0, 0);
     jump           = new util::key((n) => jump.input = n);
     dash           = new util::key((n) => dash.input = n);
     duck           = new util::key((n) => duck.input = n);
     axisX          = new util::axis((n) => axisX.input = n);
     axisY          = new util::axis((n) => axisY.input = n);
 }
Exemplo n.º 3
0
 public Look()
 {
     recenter  = false;        usePrev = false;
     inControl = true;         speed = 2.0f;
     size      = 8;            ind = 0;
     mouseX    = new util::axis((n) => mouseX.input = n);
     mouseY    = new util::axis((n) => mouseY.input = n);
 }
Exemplo n.º 4
0
 public Look()
 {
     recenter 	= false;	usePrev	= false;
     inControl 	= true;		speed	= 2.0f;
     size 		= 8;		ind 	= 0;
     mouseX 		= new util::axis((n)=>mouseX.input=n);
     mouseY 		= new util::axis((n)=>mouseY.input=n);
 }
Exemplo n.º 5
0
 public PlayerMachine()
 {
     jump   = new util::key((n) => jump.input = n);
     dash   = new util::key((n) => dash.input = n);
     duck   = new util::key((n) => duck.input = n);
     axisX  = new util::axis((n) => axisX.input = n);
     axisY  = new util::axis((n) => axisY.input = n);
     mouseX = new util::axis((n) => mouseX.input = n);
     mouseY = new util::axis((n) => mouseY.input = n);
 }
Exemplo n.º 6
0
 internal PlayerGimbal() {
     isRestoring = true;     isDead      = false;
     index       = 0;        sigma       = 0;
     iter        = 16;       inv         = 1.0f/iter;
     modSprint   = 2.1f;     modCrouch   = 3.5f;
     thetaT      = 50.0f;    timeT       = 0.8f;
     angle       = 50.0f;    rotArray    = new double[iter];
     thetaL      = 0.0f;     maxL        = 0.5f;
     cutoff      = 0.001;    roll        = new util::axis((n)=>roll.input=n);
 }
Exemplo n.º 7
0
 internal PlayerGimbal()
 {
     isRestoring = true;             isDead = false;
     index       = 0;            sigma = 0;
     iter        = 16;           inv = 1.0f / iter;
     modSprint   = 2.1f;         modCrouch = 3.5f;
     thetaT      = 50.0f;        timeT = 0.8f;
     angle       = 50.0f;        rotArray = new double[iter];
     thetaL      = 0.0f;         maxL = 0.5f;
     cutoff      = 0.001;        roll = new util::axis((n) => roll.input = n);
 }
Exemplo n.º 8
0
 public ThirdPersonController()
 {
     isLookCam 				= true;
     airSpeed 				= 6.0f;		airControl 			= 2.0f;
     gravityMult 			= 2.0f;		terminalVelocity 	= 24.0f;
     moveSpeedMult			= 1.0f; 	animSpeedMult		= 1.0f;
     stationaryTurnSpeed		= 180.0f;	movingTurnSpeed 	= 360.0f;
     headLookSpeed 			= 1.0f;		groundStick 		= 5.0f;
     moveStep 				= 0.2f;		heightStep 			= 0.3f;
     crouchHeight 			= 0.6f;		//crouchChangeSpeed = 2.0f;
     autoTurnThresholdAngle	= 100.0f;	autoTurnSpeed		= 2.0f;
     jumpRepeatDelayTime 	= 0.25f;	runCycleLegOffset 	= 0.2f;
     jumpPower 				= 12.0f;	groundCheckDist 	= 0.1f;
     jump					= new util::key((n)=>jump.input=n);
     dash 					= new util::key((n)=>dash.input=n);
     duck 					= new util::key((n)=>duck.input=n);
     axisX 					= new util::axis((n)=>axisX.input=n);
     axisY 					= new util::axis((n)=>axisY.input=n);
 }
Exemplo n.º 9
0
 public ThirdPersonController()
 {
     isLookCam              = true;
     airSpeed               = 6.0f;         airControl = 2.0f;
     gravityMult            = 2.0f;         terminalVelocity = 24.0f;
     moveSpeedMult          = 1.0f;         animSpeedMult = 1.0f;
     stationaryTurnSpeed    = 180.0f;       movingTurnSpeed = 360.0f;
     headLookSpeed          = 1.0f;         groundStick = 5.0f;
     moveStep               = 0.2f;         heightStep = 0.3f;
     crouchHeight           = 0.6f;                              //crouchChangeSpeed = 2.0f;
     autoTurnThresholdAngle = 100.0f;       autoTurnSpeed = 2.0f;
     jumpRepeatDelayTime    = 0.25f;        runCycleLegOffset = 0.2f;
     jumpPower              = 12.0f;        groundCheckDist = 0.1f;
     jump  = new util::key((n) => jump.input = n);
     dash  = new util::key((n) => dash.input = n);
     duck  = new util::key((n) => duck.input = n);
     axisX = new util::axis((n) => axisX.input = n);
     axisY = new util::axis((n) => axisY.input = n);
 }
Exemplo n.º 10
0
        internal PrototypeMotor()
        {
            jumping        = false;                wasJumping = false;
            maxSpeed       = 57.2f;                massPlayer = 80;
            dampingGround  = 30.0f;                dampingAirborne = 20.0f;
            modSprint      = 1.6f;                 modCrouch = 0.8f;
            speedAnterior  = 16.0f;                speedPosterior = 10.0f;
            speedLateral   = 12.0f;                speedVertical = 1.0f;
            extraHeight    = 4.1f;                 slidingSpeed = 15.0f;
            weightPerp     = 0.0f;                 weightSteep = 0.5f;
            lastStartTime  = 0.0f;                 lastEndTime = -100.0f;
            lateralControl = 1.0f;                 speedControl = 0.4f;
            deltaCrouch    = 1.0f;                 deltaHeight = 2.0f;
            velocity       = Vector3.zero; lastVelocity = Vector3.zero;
            groundNormal   = Vector3.zero; lastGroundNormal = Vector3.zero;
            jumpDir        = Vector3.up;   inputMove = Vector3.zero;
            hitPoint       = Vector3.zero;
            lastHitPoint   = new Vector3(Mathf.Infinity, 0, 0);

            // tpc
            isLookCam              = true;
            airSpeed               = 6.0f;         airControl = 2.0f;
            gravityMult            = 2.0f;         terminalVelocity = 24.0f;
            moveSpeedMult          = 1.0f;         animSpeedMult = 1.0f;
            stationaryTurnSpeed    = 180.0f;       movingTurnSpeed = 360.0f;
            headLookSpeed          = 1.0f;         groundStick = 5.0f;
            moveStep               = 0.2f;         heightStep = 0.3f;
            crouchHeight           = 0.6f;                              //crouchChangeSpeed = 2.0f;
            autoTurnThresholdAngle = 100.0f;       autoTurnSpeed = 2.0f;
            jumpRepeatDelayTime    = 0.25f;        runCycleLegOffset = 0.2f;
            jumpPower              = 12.0f;        groundCheckDist = 0.1f;

            axisX = new util::axis((n) => axisX.input = n);
            axisY = new util::axis((n) => axisY.input = n);
            jump  = new util::key((n) => jump.input = n);
            dash  = new util::key((n) => dash.input = n);
            duck  = new util::key((n) => duck.input = n);
        }
Exemplo n.º 11
0
        internal PrototypeMotor()
        {
            jumping			= false;		wasJumping			= false;
            maxSpeed		= 57.2f;		massPlayer			= 80;
            dampingGround	= 30.0f;		dampingAirborne		= 20.0f;
            modSprint		= 1.6f;			modCrouch			= 0.8f;
            speedAnterior	= 16.0f;		speedPosterior		= 10.0f;
            speedLateral	= 12.0f;		speedVertical		= 1.0f;
            extraHeight		= 4.1f;			slidingSpeed		= 15.0f;
            weightPerp		= 0.0f;			weightSteep			= 0.5f;
            lastStartTime	= 0.0f;			lastEndTime			= -100.0f;
            lateralControl	= 1.0f;			speedControl		= 0.4f;
            deltaCrouch 	= 1.0f;			deltaHeight			= 2.0f;
            velocity		= Vector3.zero;	lastVelocity		= Vector3.zero;
            groundNormal	= Vector3.zero;	lastGroundNormal	= Vector3.zero;
            jumpDir			= Vector3.up;	inputMove			= Vector3.zero;
            hitPoint		= Vector3.zero;
            lastHitPoint 	= new Vector3(Mathf.Infinity,0,0);

            // tpc
            isLookCam 				= true;
            airSpeed 				= 6.0f;		airControl 			= 2.0f;
            gravityMult 			= 2.0f;		terminalVelocity 	= 24.0f;
            moveSpeedMult			= 1.0f; 	animSpeedMult		= 1.0f;
            stationaryTurnSpeed		= 180.0f;	movingTurnSpeed 	= 360.0f;
            headLookSpeed 			= 1.0f;		groundStick 		= 5.0f;
            moveStep 				= 0.2f;		heightStep 			= 0.3f;
            crouchHeight 			= 0.6f;		//crouchChangeSpeed = 2.0f;
            autoTurnThresholdAngle	= 100.0f;	autoTurnSpeed		= 2.0f;
            jumpRepeatDelayTime 	= 0.25f;	runCycleLegOffset 	= 0.2f;
            jumpPower 				= 12.0f;	groundCheckDist 	= 0.1f;

            axisX = new util::axis((n)=>axisX.input=n);
            axisY = new util::axis((n)=>axisY.input=n);
            jump  = new util::key((n)=>jump.input=n);
            dash  = new util::key((n)=>dash.input=n);
            duck  = new util::key((n)=>duck.input=n);
        }