- Timestamp:
- Jan 4, 2016, 5:22:59 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15/src/modules/hover/HoverWall.cc
r11030 r11040 65 65 Wall on the right side (1) or on top (2) of this square, 0-1 66 66 */ 67 HoverWall::HoverWall(Context* context, int x, int y, int orientation) : StaticEntity(context)67 HoverWall::HoverWall(Context* context, int x, int y, int cellSize, int cellHeight, int orientation) : StaticEntity(context) 68 68 { 69 69 RegisterObject(HoverWall); … … 72 72 73 73 if(orientation == 1){ 74 xSize_ = 50;74 xSize_ = cellSize/2; 75 75 zSize_ = 2; 76 zPos_ = x* 100;77 xPos_ = y* 100 -50;76 zPos_ = x*cellSize; 77 xPos_ = y*cellSize-cellSize/2; 78 78 } 79 79 else{ 80 80 xSize_ = 2; 81 zSize_ = 50;82 zPos_ = x* 100-50;83 xPos_ = y* 100;81 zSize_ = cellSize/2; 82 zPos_ = x*cellSize-cellSize/2; 83 xPos_ = y*cellSize; 84 84 } 85 85 … … 87 87 model_ = new Model(context); 88 88 model_->setMeshSource("CuboidBody.mesh"); 89 model_->setScale3D(Vector3(xSize_*1.0f, 30.0f, zSize_*1.0f));89 model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f)); 90 90 model_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f)); 91 91 … … 97 97 98 98 cs_ = new BoxCollisionShape(context); 99 cs_->setHalfExtents(Vector3(xSize_*1.0f, 30.0f, zSize_*1.0f));99 cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f)); 100 100 cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f)); 101 101
Note: See TracChangeset
for help on using the changeset viewer.