Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1.  
  2. if (pocisk == true)
  3. {
  4. // = posY - speed * (float)sin(rotate * 3.14 / 180.0f);
  5.  
  6. this->shaderColor->GetParameter("World")->SetValue(
  7. sceneModelBox->GetMesh(i)->getLocalWorld() *
  8. glm::translate(glm::mat4(1.0f), glm::vec3(u, u2, 0.25f)) *
  9. glm::rotate(glm::mat4(1.0f), -rotate, glm::vec3(0.0f, 0.0f, 1.0f)) *
  10. glm::rotate(glm::mat4(1.0f), 90.0f, glm::vec3(1.0f, 0.0f, 0.0f)) *
  11. glm::scale(glm::mat4(1.0f), glm::vec3(0.02f, 0.03f, 0.05f))
  12.  
  13. );
  14. u = u + speed * (float)cos(rotate * 3.14 / 180.0f);
  15. u2 = u2 - speed * (float)sin(rotate * 3.14 / 180.0f);
  16. sceneModelBox->GetMesh(i)->Draw();
  17.  
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement