Phys_Map = Phys_Simulator->CreateRigidBody();
neGeometry *Geometry = Phys_Map->AddGeometry();
//Compute bounding box size from mesh
D3DXVECTOR3 min, max;
BYTE* v = 0;
MapMesh->LockVertexBuffer(0, (void**)&v);
D3DXComputeBoundingBox((D3DXVECTOR3*)v, MapMesh->GetNumVertices(), D3DXGetFVFVertexSize(MapMesh->GetFVF()), &min, &max);
MapMesh->UnlockVertexBuffer();
neV3 SizeOfMap;
SizeOfMap.Set( max.x - min.x, max.y - min.y, max.z - min.z );
Geometry->SetBoxSize(SizeOfMap);
neV3 Position;
Position.Set( 0.0f, -2.0f, 0.0f );
Phys_Map->SetPos( Position );
Phys_Map->UpdateBoundingInfo();
But it is still effected by a downpulling force, probably from the box and cylinder standing on it. How can I make it totally static, and only react as a wall, object should bounce on it by it should not more.
Tokamak colission
Im trying to use a .x file as a static floor for my game.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement