Changeset 10785
- Timestamp:
- Nov 9, 2015, 2:14:47 PM (9 years ago)
- Location:
- code/branches/hoverHS15
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hoverHS15/data/levels/Hover.oxw
r10760 r10785 29 29 ambientlight = "0.8, 0.8, 0.8" 30 30 skybox = "Orxonox/Starbox" 31 gravity = "0, -35, 0" 31 32 > 32 33 … … 35 36 36 37 37 <StaticEntity position=" 200,0,0" collisionType="static">38 <StaticEntity position="0,0,0" collisionType="static"> 38 39 <attached> 39 40 <Model position="500, 0, 0" yaw="0" pitch="0" roll="0" scale3D="500, 30, 2" mesh="cube_red.mesh" /> … … 56 57 </attached> 57 58 <collisionShapes> 58 <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,0,0" halfExtents="1 , 1, 1" />59 <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,0,0" halfExtents="10000, 1, 10000" /> 59 60 </collisionShapes> 60 61 </StaticEntity> -
code/branches/hoverHS15/src/modules/hover/Hover.cc
r10760 r10785 59 59 { 60 60 firstTick = false; 61 new HoverWall(origin_->getContext(), 1, 2 );62 new HoverWall(origin_->getContext(), 2, 6 );61 new HoverWall(origin_->getContext(), 1, 2, 1); 62 new HoverWall(origin_->getContext(), 2, 6, 1); 63 63 } 64 64 -
code/branches/hoverHS15/src/modules/hover/HoverWall.cc
r10760 r10785 54 54 } 55 55 56 HoverWall::HoverWall(Context* context, int x, int y ) : StaticEntity(context)56 HoverWall::HoverWall(Context* context, int x, int y, int orientation) : StaticEntity(context) 57 57 { 58 58 RegisterObject(HoverWall); 59 59 60 int xSize_, zSize_, xPos_, zPos_; 61 62 if(orientation == 1){ 63 xSize_ = 50; 64 zSize_ = 2; 65 xPos_ = x*100; 66 zPos_ = y*100-50; 67 } 68 else{ 69 xSize_ = 2; 70 zSize_ = 50; 71 xPos_ = x*100-50; 72 zPos_ = y*100; 73 } 74 75 60 76 model_ = new Model(context); 61 77 model_->setMeshSource("cube.mesh"); 62 model_->setScale3D(Vector3( 100, 30, 2));63 model_->setPosition(Vector3(x *100-50,0,y*100-50));78 model_->setScale3D(Vector3(xSize_, 30, zSize_)); 79 model_->setPosition(Vector3(xPos_,0,zPos_)); 64 80 65 81 this->attach(model_); … … 70 86 71 87 cs_ = new BoxCollisionShape(context); 72 cs_->setHalfExtents(Vector3( 100, 30, 2));73 cs_->setPosition(Vector3(x *100-50,0,y*100-50));88 cs_->setHalfExtents(Vector3(xSize_, 30, zSize_)); 89 cs_->setPosition(Vector3(xPos_,0,zPos_)); 74 90 75 91 this->attachCollisionShape(cs_); -
code/branches/hoverHS15/src/modules/hover/HoverWall.h
r10751 r10785 49 49 public: 50 50 HoverWall(Context* context); 51 HoverWall(Context* context, int x, int y );51 HoverWall(Context* context, int x, int y, int orientation); 52 52 virtual ~HoverWall(); 53 53 virtual void tick(float dt);
Note: See TracChangeset
for help on using the changeset viewer.