GL - testing
This commit is contained in:
parent
ac278555ea
commit
6818dda2b9
|
@ -84,7 +84,7 @@ using namespace GameLogic;
|
|||
if(kineticEnergyLoss > forceThreashHold) //should only take damage if the force is high enough
|
||||
{
|
||||
damageDone = kineticEnergyLoss * 0.10f;
|
||||
player.DamageLife(damageDone);
|
||||
//player.DamageLife(damageDone);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@ Game::PlayerData::PlayerData()
|
|||
sbDesc.size = Oyster::Math::Float3(4,7,4);
|
||||
sbDesc.mass = 70;
|
||||
sbDesc.restitutionCoeff = 0.5;
|
||||
sbDesc.frictionCoeff_Static = 0.4;
|
||||
sbDesc.frictionCoeff_Dynamic = 0.3;
|
||||
sbDesc.rotation = Oyster::Math::Float3(0, Oyster::Math::pi, 0);
|
||||
|
||||
//create rigid body
|
||||
|
|
|
@ -156,6 +156,8 @@ void Object::EndFrame()
|
|||
//error
|
||||
int i =0 ;
|
||||
}
|
||||
|
||||
|
||||
if(currPhysicsState.GetGravityNormal()!= Float3::null)
|
||||
{
|
||||
Oyster::Math::Float4 axis;
|
||||
|
@ -170,6 +172,18 @@ void Object::EndFrame()
|
|||
Oyster::Math::Float3 debug = ::LinearAlgebra3D::WorldAxisOf(::LinearAlgebra3D::Rotation(axis.xyz), Oyster::Math::Float3::standard_unit_y);
|
||||
debug += currPhysicsState.GetGravityNormal();
|
||||
}
|
||||
Oyster::Math::Float3 pos = currPhysicsState.GetCenterPosition();
|
||||
Oyster::Math::Float3 up = -currPhysicsState.GetGravityNormal();
|
||||
//300, 0,0,
|
||||
//1,0,0
|
||||
|
||||
if( pos.GetLength() < 303.5f)
|
||||
{
|
||||
Oyster::Math::Float moveUp = 303.5 - pos.GetLength();
|
||||
up *= moveUp;
|
||||
|
||||
//currPhysicsState.SetCenterPosition(pos + up);
|
||||
}
|
||||
|
||||
|
||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
using namespace GameLogic;
|
||||
using namespace Oyster::Physics;
|
||||
const int MOVE_FORCE = 5000;
|
||||
const int MOVE_FORCE = 500;
|
||||
Player::Player()
|
||||
:DynamicObject()
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ void Player::EndFrame()
|
|||
Oyster::Math::Float3 up = currPhysicsState.GetOrientation().v[1];
|
||||
Oyster::Math::Float3 deltaAxis = up * (-dx * 0.02) ;
|
||||
|
||||
currPhysicsState.AddRotation(deltaAxis);
|
||||
//currPhysicsState.AddRotation(deltaAxis);
|
||||
dx = 0;
|
||||
this->newPhysicsState = this->currPhysicsState;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue