- Timestamp:
- Jan 4, 2016, 5:22:59 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15/src/modules/hover/HoverFlag.cc
r11030 r11040 64 64 Y-Coordinate of the flage, 0-9, origin is bottom left 65 65 */ 66 HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate ) : StaticEntity(context)66 HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate, int cellSize) : StaticEntity(context) 67 67 { 68 68 RegisterObject(HoverFlag); … … 74 74 model_->setMeshSource("ss_flag_eu.mesh"); 75 75 model_->setScale3D(Vector3(5, 5, 5)); 76 model_->setPosition(Vector3(xCoordinate* 100.0f + 50.0f,10.0f,yCoordinate*100.0f + 50.0f));76 model_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,10.0f,yCoordinate*cellSize*1.0f + cellSize/2)); 77 77 78 78 this->attach(model_); … … 84 84 cs_ = new BoxCollisionShape(context); 85 85 cs_->setHalfExtents(Vector3(5, 5, 5)); 86 cs_->setPosition(Vector3(xCoordinate* 100.0f + 50.0f,0.0f,yCoordinate*100.0f + 50.0f));86 cs_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,0.0f,yCoordinate*cellSize*1.0f + cellSize/2)); 87 87 88 88 this->attachCollisionShape(cs_);
Note: See TracChangeset
for help on using the changeset viewer.