[Change] Just messing with a few values. Put some space between the other actors.
This commit is contained in:
parent
754e25f116
commit
a7928d0066
@ -190,7 +190,7 @@ void L3D::MainLoop(void) {
|
|||||||
player = new Player(ShipType::SLEEK);
|
player = new Player(ShipType::SLEEK);
|
||||||
player->SetLabel("Me");
|
player->SetLabel("Me");
|
||||||
player->SetFrame(earth_frame);
|
player->SetFrame(earth_frame);
|
||||||
player->SetPosition(vector3d(100, 0, 0));
|
player->SetPosition(vector3d(0, 0, 8000000.0));
|
||||||
Space::AddBody(player);
|
Space::AddBody(player);
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++) {
|
for(int i = 0; i < 4; i++) {
|
||||||
@ -199,7 +199,7 @@ void L3D::MainLoop(void) {
|
|||||||
snprintf(buf, sizeof(buf), "X%c-0%02d", "A"+i, i);
|
snprintf(buf, sizeof(buf), "X%c-0%02d", "A"+i, i);
|
||||||
body->SetLabel(buf);
|
body->SetLabel(buf);
|
||||||
body->SetFrame(earth_frame);
|
body->SetFrame(earth_frame);
|
||||||
body->SetPosition(vector3d(i*2000, 0, -400));
|
body->SetPosition(vector3d(i*2000, 0, 8000400));
|
||||||
Space::AddBody(body);
|
Space::AddBody(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,13 +207,13 @@ void L3D::MainLoop(void) {
|
|||||||
SpaceStation* body = new SpaceStation();
|
SpaceStation* body = new SpaceStation();
|
||||||
body->SetLabel("Some Back Country Joint");
|
body->SetLabel("Some Back Country Joint");
|
||||||
body->SetFrame(earth_frame);
|
body->SetFrame(earth_frame);
|
||||||
body->SetPosition(vector3d(0, 0, 600));
|
body->SetPosition(vector3d(0, 0, 7999400));
|
||||||
Space::AddBody(body);
|
Space::AddBody(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
Planet* planet = new Planet(StarSystem::SBody::SUBTYPE_PLANET_INDIGENOUS_LIFE);
|
Planet* planet = new Planet(StarSystem::SBody::SUBTYPE_PLANET_INDIGENOUS_LIFE);
|
||||||
planet->SetLabel("Earth");
|
planet->SetLabel("Earth");
|
||||||
planet->SetPosition(vector3d(0, 0, -8000000.0));
|
planet->SetPosition(vector3d(0, 0, 0));
|
||||||
planet->SetFrame(earth_frame);
|
planet->SetFrame(earth_frame);
|
||||||
Space::AddBody(planet);
|
Space::AddBody(planet);
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ void Ship::TimeStepUpdate(const float timeStep) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(m_wheelTransition != 0.0f) {
|
if(m_wheelTransition != 0.0f) {
|
||||||
m_wheelState += m_wheelTransition*timeStep*0.001;
|
m_wheelState += m_wheelTransition*timeStep;
|
||||||
m_wheelState = CLAMP(m_wheelState, 0, 1);
|
m_wheelState = CLAMP(m_wheelState, 0, 1);
|
||||||
if((m_wheelState == 0) || (m_wheelState == 1)) m_wheelTransition = 0;
|
if((m_wheelState == 0) || (m_wheelState == 1)) m_wheelTransition = 0;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ const ShipType ShipType::types[] = {
|
|||||||
* Sirius corporation make a range of lovely ships!
|
* Sirius corporation make a range of lovely ships!
|
||||||
*/
|
*/
|
||||||
"Sirius Interdictor", 61,
|
"Sirius Interdictor", 61,
|
||||||
{ 1e8, -1e8, 1e7, -1e6, -1e7, 1e7 },
|
{ 4e8, -4e8, 1e8, -1e8, -1e8, 1e8 },
|
||||||
1e7,
|
1e7,
|
||||||
{
|
{
|
||||||
{ vector3f(0, -0.5, 0), vector3f(0, 0, -1) },
|
{ vector3f(0, -0.5, 0), vector3f(0, 0, -1) },
|
||||||
|
@ -149,17 +149,18 @@ static bool _OnCollision(dGeomID g1, dGeomID g2, Object* o1, Object* o2,
|
|||||||
|
|
||||||
static void nearCallback(void* data, dGeomID oO, dGeomID o1) {
|
static void nearCallback(void* data, dGeomID oO, dGeomID o1) {
|
||||||
/* Create an array of dContact objects to hold the contact joints. */
|
/* Create an array of dContact objects to hold the contact joints. */
|
||||||
static const int MAX_CONTACTS = 10;
|
static const int MAX_CONTACTS = 20;
|
||||||
dContact contact[MAX_CONTACTS];
|
dContact contact[MAX_CONTACTS];
|
||||||
|
|
||||||
for(int i = 0; i < MAX_CONTACTS; i++) {
|
for(int i = 0; i < MAX_CONTACTS; i++) {
|
||||||
contact[i].surface.mode = dContactBounce;
|
contact[i].surface.mode = dContactBounce;
|
||||||
contact[i].surface.mu = 0;
|
contact[i].surface.mu = 0;
|
||||||
contact[i].surface.mu2 = 0;
|
contact[i].surface.mu2 = 0;
|
||||||
contact[i].surface.bounce = 0.5;
|
contact[i].surface.bounce = 0.1;
|
||||||
contact[i].surface.bounce_vel = 0.1;
|
contact[i].surface.bounce_vel = 0.1;
|
||||||
}
|
}
|
||||||
if(int numc = dCollide(oO, o1, MAX_CONTACTS, &contact[0].geom, sizeof(dContact))) {
|
if(int numc = dCollide(oO, o1, MAX_CONTACTS, &contact[0].geom, sizeof(dContact))) {
|
||||||
|
printf("%d contacts\n", numc);
|
||||||
Object* po1 = static_cast<Object*>(dGeomGetData(oO));
|
Object* po1 = static_cast<Object*>(dGeomGetData(oO));
|
||||||
Object* po2 = static_cast<Object*>(dGeomGetData(o1));
|
Object* po2 = static_cast<Object*>(dGeomGetData(o1));
|
||||||
if(!_OnCollision(oO, o1, po1, po2, numc, contact)) return;
|
if(!_OnCollision(oO, o1, po1, po2, numc, contact)) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user