Skip to content

Commit

Permalink
ver. 1.5.0 Release - fixed cockpit PoV with Head == Tail (alias PoV =…
Browse files Browse the repository at this point in the history
…= TGT)
  • Loading branch information
BrutPitt committed May 31, 2020
1 parent 0b66246 commit ae1fa5a
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/src/partSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,8 @@ GLuint particlesSystemClass::renderTF()
getTMat()->getPerspFar());


/*
const vec3 vecDirH = (cpTGT) + (cpPOV-cpTGT)*cPit.getMovePositionHead();
const vec3 vecDirT = (cpPOV-cpTGT) + (cpPOV-cpTGT)*cPit.getMovePositionTail();
mat4 m = translate(mat4(1.f), vecDirH);
m = m * mat4_cast(cPit.getRotation());
cpPOV = mat4(m) * vec4(vecDirT, 1.0);
//cpTGT = mat4(m) * vec4(vecDirH, 1.0);
cpTM->setView(cpPOV, vecDirH);
*/
const vec3 vecDirH = (cpPOV-cpTGT) + (cpPOV-cpTGT)*cPit.getMovePositionHead();
const float realPosH = cPit.getMovePositionHead()==cPit.getMovePositionTail() ? cPit.getMovePositionHead()-.001 : cPit.getMovePositionHead();
const vec3 vecDirH = (cpPOV-cpTGT) + (cpPOV-cpTGT)*realPosH;
const vec3 vecDirT = (cpPOV-cpTGT) + (cpPOV-cpTGT)*cPit.getMovePositionTail();

mat4 m = translate(mat4(1.f), cpTGT);
Expand Down

0 comments on commit ae1fa5a

Please sign in to comment.