GL - added test box to level
This commit is contained in:
parent
3896514bae
commit
a8dbf2a4c9
|
@ -30,7 +30,7 @@ namespace DanBias
|
||||||
NetworkSession* owner;
|
NetworkSession* owner;
|
||||||
Utility::DynamicMemory::DynamicArray<Utility::DynamicMemory::SmartPointer<LobbyClient>> clients;
|
Utility::DynamicMemory::DynamicArray<Utility::DynamicMemory::SmartPointer<LobbyClient>> clients;
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameSession();
|
GameSession();
|
||||||
virtual~GameSession();
|
virtual~GameSession();
|
||||||
|
|
|
@ -113,8 +113,10 @@ namespace DanBias
|
||||||
|
|
||||||
void GameSession::ObjectMove(GameLogic::IObjectData* movedObject)
|
void GameSession::ObjectMove(GameLogic::IObjectData* movedObject)
|
||||||
{
|
{
|
||||||
movedObject->GetID();
|
/*int id= movedObject->GetID();
|
||||||
movedObject->GetOrientation();
|
Oyster::Math::Float4x4 world = movedObject->GetOrientation();
|
||||||
|
Protocol_ObjectPosition p(world, 2);
|
||||||
|
Send(p.GetProtocol());*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,5 +73,9 @@ using namespace GameLogic;
|
||||||
void AttatchmentMassDriver::ForcePushAction(Oyster::Physics::ICustomBody *obj)
|
void AttatchmentMassDriver::ForcePushAction(Oyster::Physics::ICustomBody *obj)
|
||||||
{
|
{
|
||||||
Oyster::Math::Float4 pushForce = Oyster::Math::Float4(1,0,0,0) * (500);
|
Oyster::Math::Float4 pushForce = Oyster::Math::Float4(1,0,0,0) * (500);
|
||||||
((Object*)obj->GetCustomTag())->ApplyLinearImpulse(pushForce);
|
Oyster::Physics::ICustomBody::State state;
|
||||||
|
state = obj->GetState();
|
||||||
|
state.ApplyLinearImpulse(pushForce);
|
||||||
|
obj->SetState(state);
|
||||||
|
//((Object*)obj->GetCustomTag())->ApplyLinearImpulse(pushForce);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,18 +39,18 @@ void Level::InitiateLevel(float radius)
|
||||||
levelObj = new StaticObject(rigidBody, LevelCollision, OBJECT_TYPE::OBJECT_TYPE_WORLD);
|
levelObj = new StaticObject(rigidBody, LevelCollision, OBJECT_TYPE::OBJECT_TYPE_WORLD);
|
||||||
|
|
||||||
|
|
||||||
API::SphericalBodyDescription sbDesc_TestBox;
|
API::SimpleBodyDescription sbDesc_TestBox;
|
||||||
sbDesc.centerPosition = Oyster::Math::Float4(3,15,0,0);
|
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(3,15,0,0);
|
||||||
sbDesc.ignoreGravity = true;
|
sbDesc_TestBox.ignoreGravity = false;
|
||||||
sbDesc.radius = 8; //radius;
|
sbDesc_TestBox.mass = 10;
|
||||||
sbDesc.mass = 10e12f;
|
sbDesc_TestBox.size = Oyster::Math::Float4(2,2,2,0);
|
||||||
//sbDesc.mass = 0; //10^16
|
//sbDesc.mass = 0; //10^16
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ICustomBody* rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release();
|
ICustomBody* rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release();
|
||||||
|
|
||||||
DynamicObject *testBox = new DynamicObject(rigidBody_TestBox,LevelCollision,OBJECT_TYPE::OBJECT_TYPE_BOX);
|
testBox = new DynamicObject(rigidBody_TestBox,LevelCollision,OBJECT_TYPE::OBJECT_TYPE_BOX);
|
||||||
|
|
||||||
/*API::Gravity gravityWell;
|
/*API::Gravity gravityWell;
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ namespace GameLogic
|
||||||
GameMode gameMode;
|
GameMode gameMode;
|
||||||
Utility::DynamicMemory::SmartPointer<Oyster::Physics::ICustomBody> rigidBodyLevel;
|
Utility::DynamicMemory::SmartPointer<Oyster::Physics::ICustomBody> rigidBodyLevel;
|
||||||
StaticObject *levelObj;
|
StaticObject *levelObj;
|
||||||
|
DynamicObject *testBox;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue