GL collision with level should worm
This commit is contained in:
parent
3f144289ec
commit
121fd51c45
|
@ -32,6 +32,9 @@ using namespace GameLogic;
|
|||
case OBJECT_TYPE::OBJECT_TYPE_PLAYER:
|
||||
//return Physics::ICustomBody::SubscriptMessage_none;
|
||||
break;
|
||||
case OBJECT_TYPE::OBJECT_TYPE_WORLD:
|
||||
int test = 5;
|
||||
break;
|
||||
}
|
||||
|
||||
//return Physics::ICustomBody::SubscriptMessage_none;
|
||||
|
|
|
@ -26,8 +26,11 @@ void Level::InitiateLevel(float radius)
|
|||
sbDesc.mass = 10e12f;
|
||||
//sbDesc.mass = 0; //10^16
|
||||
sbDesc.subscription_onCollisionResponse = Level::LevelCollision;
|
||||
levelObj = new StaticObject(OBJECT_TYPE::OBJECT_TYPE_WORLD);
|
||||
|
||||
|
||||
ICustomBody* rigidBody = API::Instance().CreateRigidBody(sbDesc).Release();
|
||||
rigidBody->SetCustomTag(levelObj);
|
||||
API::Instance().AddObject(rigidBody);
|
||||
ICustomBody::State state;
|
||||
rigidBody->GetState(state);
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace GameLogic
|
|||
Utility::DynamicMemory::DynamicArray<Utility::DynamicMemory::SmartPointer<DynamicObject>> dynamicObjects;
|
||||
GameMode gameMode;
|
||||
Utility::DynamicMemory::SmartPointer<Oyster::Physics::ICustomBody> rigidBodyLevel;
|
||||
StaticObject *levelObj;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -14,6 +14,11 @@ StaticObject::StaticObject(void* collisionFunc, OBJECT_TYPE type)
|
|||
:Object(collisionFunc,type)
|
||||
{
|
||||
|
||||
}
|
||||
StaticObject::StaticObject(OBJECT_TYPE type)
|
||||
:Object(NULL,type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace GameLogic
|
|||
public:
|
||||
StaticObject();
|
||||
StaticObject(void* collisionFunc, OBJECT_TYPE type);
|
||||
StaticObject(OBJECT_TYPE type);
|
||||
~StaticObject(void);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue