Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8030 in orxonox.OLD for branches/bsp_model/src/world_entities


Ignore:
Timestamp:
May 31, 2006, 3:22:23 PM (18 years ago)
Author:
bottac
Message:

bsp_manager now knows the normals of the planes into which an obj collided.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/world_entities/world_entity.cc

    r7833 r8030  
    288288{
    289289 
    290   PRINTF(0)("BSP_GROUND: Player collides \n", this->getClassName() );
     290  // PRINTF(0)("BSP_GROUND: Player collides \n", this->getClassName() );
     291 
    291292  Vector v = this->getAbsDirX();
    292293  v.x *= 10;
    293294  v.y *= 10;
    294295  v.z *= 10;
     296  Vector u = this->getAbsDirY();
     297 
     298  if(feet.x == (u.x+this->getAbsCoor().x) &&  feet.y == u.y +this->getAbsCoor().y && feet.z == this->getAbsCoor().z)
     299  {
     300   
    295301  this->setAbsCoor(ray_2 - v);
     302  }
     303  else
     304  {
     305    if(ray_1.x == this->getAbsCoor().x + v.x && ray_1.y == this->getAbsCoor().y + v.y + 0.1 && ray_1.z ==this->getAbsCoor().z + v.z)
     306    {
     307      this->setAbsCoor(feet -u ); 
     308    }
     309     
     310    this->setAbsCoor(ray_2 - v); 
     311   
     312  }
    296313}
    297314
Note: See TracChangeset for help on using the changeset viewer.